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/id_rsa.pub 
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDb...rGSQxR8t xxx@xxxxxx


remotely

$ 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/id_rsa.pub | 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

Install Maven 3.1.1 on Ubuntu 13.10