LeBauer:Software/Misc: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
==SSH==
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:===
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:
<pre>
host cl
hostname cluster.illinois.edu
user dlebauer
</pre>
this allows logging in with the command
<pre>ssh cl</pre>
instead of <pre>ssh cluster.illinois.edu </pre>
This alias (in this case, 'cl') can also be used from emacs and other programs that use ssh.

Latest revision as of 09:50, 10 November 2010