art

geek

howto

music

politics

Home » blah

HOWTO: Passwordless ssh logins

openssh.pngHaving the ability to do passwordless ssh logins helps in so many ways when automating tasks via scripts in Unix/Linux/BSD. Thankfully the great OpenSSH can take care of that for you, allowing you to do ssh, scp, sftp from and to multiple hosts. I always have to look up how to do it, so this time I found a good, consise way, and am setting it here for reference. For more detailed instructions check out the page this is taken from, otherwise fire up yr term and do it, “…for great justice!”

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub | ssh REMOTE_SERVER 'cat - >> ~/.ssh/authorized_keys'
ssh REMOTE_SERVER 'chmod 700 .ssh'
ssh REMOTE_SERVER

Tags: ,

Related posts

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.