Skip to content

Instantly share code, notes, and snippets.

@ryanjm
Created February 26, 2010 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanjm/315460 to your computer and use it in GitHub Desktop.
Save ryanjm/315460 to your computer and use it in GitHub Desktop.
Shortcut for accessing ssh
I set up my ssh such that I don't have to put in the password every time and that I have a shortcut to get to the remote machine.
In this case I'm logging into a school computer named csil. So I made an alias:
alias csil='ssh csil'
This calls on ~/.ssh/config which looks like this:
Host csil
HostName address.to.remote.computer
User username
Then in order to not put in the password every time, I followed a site's instructions:
1) Generate a ssh key (though I already had one set up so I didn't need this step, it would be nice to know if I could have multiple keys though):
ssh-keygen -t rsa # It asks for some stuff, just hit Enter (three times).
2) Copy the file onto the remote server:
ssh username@ssh.server.com mkdir -p .ssh — Server password
cat .ssh/id_rsa.pub | ssh username@ssh.server.com 'cat >> .ssh/authorized_keys' — server password.
http://www.gninneh.dk/2007/08/29/using-ssh-in-terminal-without-entering-password/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment