Ubuntu 18.04 Setup SSH Public Key Authentication

last updated in Categories ,

I am a new Ubuntu 18.04 LTS user and I would like to setup ssh public key authentication. How do I set up ssh keys based authentication on Ubuntu Linux 18.04 LTS server? How do I set up SSH keys on an Ubuntu Linux 18.04 LTS server? In Ubuntu 18.04 LTS, how do I set up public key authentication?

How to exclude file when using scp command recursively

last updated in Categories , , ,

I need to copy all the *.c files from local laptop named hostA to hostB including all directories. I am using the following scp command but do not know how to exclude specific files (such as *.out):
$ scp -r ~/projects/ user@hostB:/home/delta/projects/
How do I tell scp command to exclude particular file or directory at the Linux/Unix command line?

Apple OS X: Install X Window System XQuartz For SSH X11 Forwarding On a Mavericks or Yosemite

last updated in Categories , , , ,

I need to tunnel X Window securely over SSH bases session so that I run X program on my remote Linux/Unix server/workstation and get back display to my Apple Macbook pro laptop. I tried the ssh -X user@server1 and ssh -Y user@server2 commands on both OS X Mountain Lion and Apple OS X Mavericks/Yosemite. But, I am unable to use the ssh command with X11.

How do I fix this problem on OS X and enable X11 forwarding with ssh command? How do I install XQuartz (X11.app) server on Apple OS X Mountain Lion or Mavericks or Yosemite?