LeBauer:Software/Misc: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 2: Line 2:
located in ~/.ssh/config
located in ~/.ssh/config


===public/private keys===
Setting up public and private keys allows logging in without use of a password. This simplifies login, and it also enables processes to be automated, for example rsync, or sending commands from one server to another. This is actually very simple to do.


<pre>
mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa
ssh-copy-id <username>@<host>
</pre>
[https://help.ubuntu.com/community/SSH/OpenSSH/Keys more information about setting up public/private key pairs]


===ssh config file:===
===ssh config file:===

Revision as of 09:48, 10 November 2010

SSH

located in ~/.ssh/config


ssh config file:

To make logging in easier, especially when your login name is different on your computer and the remote computer, I first set up my ssh config file with an alias to the remote address


here is an example of an ~/.ssh/config file:

host cl
hostname cluster.illinois.edu
user dlebauer

this allows logging in with the command

ssh cl

instead of

ssh cluster.illinois.edu 

This alias (in this case, 'cl') can also be used from emacs and other programs that use ssh.