Simple ssh without password

I have to ssh into a server where the source and destination .ssh folder was empty (but ssh was installed)

Here are the steps needed (using rsa)

locally generate and get the content of the key (line starting with ssh-rsa...)

$ ssh-keygen -t rsa
$ cat ~/.ssh/ 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDb...rGSQxR8t xxx@xxxxxx


$ cd ~/.ssh 
$ touch authorized_keys
$ chmod 600 authorized_keys

and then to append the content of the public key to the list of authorized key

$ vi authorized_keys 

In one command:

$ cat .ssh/ | ssh user@host 'cat >> .ssh/authorized_keys'

Popular posts from this blog

Simple Samba setup on Lubuntu

Soving AccessDenied on Google Cloud Storage domain mapping

USB Foot Switch II - "Usb HIDKB Not connected"