Difference between revisions of "Making an ssh key"
|Line 7:||Line 7:|
== OpenSSH ==
== OpenSSH ==
<li>If openssh is not already installed, on Debian/Ubuntu try <pre>aptitude install openssh-client</pre>or Redhat/CentOS
<li>If openssh is not already installed, on Debian/Ubuntu try <pre>aptitude install openssh-client</pre>or Redhat/CentOS<pre>yum install openssh-clients</pre> or download the portable source from [http://www.openssh.org/portable.html openssh.org] and compile it. When OpenSSH is setup you can generate a key and try to login.</li>
Revision as of 08:39, 13 October 2011
Some other programs are SecureCRT and xshell.
- If openssh is not already installed, on Debian/Ubuntu try
aptitude install openssh-clientor on Redhat/CentOS
yum install openssh-clientsor download the portable source from openssh.org and compile it. When OpenSSH is setup you can generate a key and try to login.
$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/nick/.ssh/id_rsa): /home/nick/thesshkey Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/nick/thesshkey. Your public key has been saved in /home/nick/thesshkey.pub. The key fingerprint is: 20:78:b9:01:15:3a:43:60:7b:7b:55:b3:7f:3b:a5:20 nick@theclient The key's randomart image is: +--[ RSA 2048]----+ |.oo.o. o | |...+ . . o | | .=.= .. . | | .+.+.. . | | ... SE o . . | | . . o + | | + | | . | +-----------------+
If you use the default key filename /home/nick/.ssh/id_rsa ssh will try to use it automatically.
- Email the public key (in this case /home/nick/thesshkey.pub) to email@example.com with your username and other information.
- Once your account is setup with the public key, login to the server with your private key:
nick@theclient:~/prgmr$ ssh -i /home/nick/thesshkey asdfasdf@theserver
- Download the PuTTY installer and install it.
- Run PuTTYgen:
- Generate a key:
- Enter a passphrase for the private key.
- Save the public and private key files
- Email the public key file to firstname.lastname@example.org.
- Set the private key file in PuTTY (run PuTTY from the start menu instead of PuTTYgen)
- Then save the setting to the Default Settings or a new profile under Saved Sessions and enter a hostname or username@hostname.
- Press open to connect to the server.