Created
February 26, 2010 05:34
-
-
Save ryanjm/315460 to your computer and use it in GitHub Desktop.
Shortcut for accessing ssh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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