Skip to content

ssh login without password

I need to make a note of this, as I keep on looking it up on the web. Here’s the situation: you want to automate access to a server from your private machine, and are prepared to give up the security of the password prompt to get this extra benefit. If so, use this:

ssh-keygen -t dsa -N ""
ssh  mkdir -p -m 700 $HOME/.ssh
# The next command should be the last time ssh asks for a password.
cat $HOME/.ssh/ | ssh  'cat >>$HOME/.ssh/authorized_keys'

Post a Comment

Your email is never published nor shared. Required fields are marked *