Comments have been closed for this post.
Hello, my name is Federico Capoano,
I enjoy developing cutting-edge websites
and working with creative people.
15th June 2012 in Coding Tags: linux, system-administration
Today I want to share with you an useful bash command to quickly add an SSH key to a remote host.
Assuming you already generated an SSH key for your local machine and public RSA key access is active on your remote machine, the command is:
$ cat /home/<local_user>/.ssh/id_rsa.pub | ssh <remote_user>@<host> 'cat >> .ssh/authorized_keys'
Substitute <local_user> with the username on your local machine (eg: nemesis), <remote_user> with the user for which you want to log in on your remote server (eg: root) and <host> with the host (eg: nemesisdesign.net).
Nice isn't it? Thanks to Andrea Ferraresi for this tip.
Comments have been closed for this post.
“ I got very good results with this, thanks for sharing. ”
By Yasir Atabani in How to speed up tests with Django and PostgreSQL
“ Hi Amad, for any question regarding OpenWISP, use one of the support channels: http://openwisp.org/support.html ”
By Federico Capoano in How to install OpenWISP
“ Sir please guid , i have install the ansible-openwisp2 , now how to add the access points . What is the next procedure . Please help. ”
By Ahmad in How to install OpenWISP
“ Hi Ronak, for any question regarding OpenWISP, use one of the support channels: http://openwisp.org/support.html ”
By Federico Capoano in netjsonconfig: convert NetJSON to OpenWRT UCI
“ Hi, I have installed openwisp controller using ansible playbook. Now, i am adding the configurations automatically using OPENWRT devices in openwisp file by specifying shared_key so can you suggest me if I want to set limit to add configuration how can i do it? ”
By Ronak in netjsonconfig: convert NetJSON to OpenWRT UCI