a@A:~> cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'
b@B's password: 

or other example:
kowalczy@localhost:~$ cat ~/.ssh/id_rsa.pub | ssh svc_hes_user@psw-jenkins 'cat >> ~/.ssh/authorized_keys'
svc_hes_user@psw-jenkins's password:
kowalczy@localhost:~$ ssh svc_hes_user@psw-jenkins
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)


more info at: http://www.linuxproblem.org/art_9.html

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s