On 12/08/11 19:51, Mallett wrote:
> I have been wondering is there a way that I can copy a rsa public key
> to a server in one command.
>
> I can do this
>
> ssh 192.168.1.220 mkdir -m 700 ~/.ssh
>
> rsync /home/aaa/.ssh/id_rsa.pub [email protected]
> <mailto:john@calso>:.ssh/authorized_keys
>
>
> but it means I have to log in twice.

You could try

mkdir -m 700 dot.ssh-remote && cp .scp/id_rsa.pub 
dot.ssh-remote/authorized_keys && scp -r dot.ssh-remote 192.168.1.220:.ssh

OK, so it's multiple commands, but only one remote login.  I have no
idea if this is the simplest way to do this.

--Aidan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Linux-users mailing list
[email protected]
http://lists.canterbury.ac.nz/mailman/listinfo/linux-users

Reply via email to