sshkey
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
sshkey [2008/12/02 15:01] – cangiani | sshkey [2011/04/05 16:04] – cangiani | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Ssh without password from local workstation ===== | ===== Ssh without password from local workstation ===== | ||
+ | ==== Generate the public/ | ||
+ | |||
+ | Note that this doc applies only to Unix (Mac/ | ||
- | ==== Apple Os X & Linux ==== | ||
* Login in your workstation and open a Terminal Windows (if you are using the Graphical interface) | * Login in your workstation and open a Terminal Windows (if you are using the Graphical interface) | ||
Line 13: | Line 15: | ||
* When the system ask a name for the file **id_dsa** just press enter | * When the system ask a name for the file **id_dsa** just press enter | ||
- | * Do the same for the **id_dsa.pub** file | ||
- | * cd in your .ssh directory with | + | * The system will ask your for a password. This is the password that is used to encrypt your private key file (id_dsa) so that, even if the file gets stolen, it cannot be used. Try to generate a [[strongpass|strong password]]. |
- | | + | |
- | | + | |
- | | + | |
- | From now, every time you connet to a server, the server will recognize your workstation automatically (it read the ~/.ssh/authorized_keys file everytime you connect) and you can login without bothering with the password. | + | $ cat ~/.ssh/id_dsa.pub >> ~/ |
- | ===== Ssh without password from laptop ===== | + | From now, every time you connet to a server, |
- | + | ||
- | + | ||
- | ==== Apple Os X & Linux ==== | + | |
- | + | ||
- | * Open a terminal emulation window | + | |
- | * Execute | + | |
- | + | ||
- | $ ssh-keygen -t dsa | + | |
- | + | ||
- | * When the system ask a name for the file **id_dsa** just press enter | + | |
- | * Do the same for the **id_dsa.pub** file | + | |
- | * cd in your .ssh directory with | + | |
- | + | ||
- | $ cd ~/.ssh | + | |
- | + | ||
- | * Execute this command | + | |
- | $ cat id_dsa.pub | + | ==== Setup ssh-agent ==== |
- | * Open another window and from this connect | + | In fact, since your private key is encrypted, you need to type the password that can decrypt it each time you want to use it. Seems like we didn't gain anything till now. |
- | * cd in .ssh directory with | + | |
- | $ cd ~/.ssh | + | Ssh-agent is a program that keeps in memory your decrypted private |
- | * Execute the command | + | Let's set it up. |
- | + | ||
- | $ cat >> authorized_keys | + | |
- | * Now copy & paste with the mouse the key you have in the first window (something that start with sh-dss AAAAB3NzaC1k....) to the second window. | ||
- | * press the " | ||
- | * Try to connect to **lth.epfl.ch**, |
sshkey.txt · Last modified: 2022/08/05 13:20 by admin