Difference between revisions of "UsingSSH"

From SourceWiki
Jump to navigation Jump to search
m (Protected "UsingSSH" [edit=sysop:move=sysop])
Line 19: Line 19:
 
</pre>
 
</pre>
  
The default filename suggested is fine, so accept it by hitting the return key.
+
The default filename suggested is fine, so accept it by hitting '''return'''.
  
 
Next you are prompted for a '''passphrase''':
 
Next you are prompted for a '''passphrase''':

Revision as of 16:45, 10 June 2009

Using SSH to connect to machines and to move data

Introduction

Using Key-Pairs

Creating the Keys

First, let's create a key-pair. Start by typing:

ssh-keygen

You will see a message like:

Generating public/private rsa key pair.
Enter file in which to save the key (/gsb6/ggdagw/.ssh/id_rsa):

The default filename suggested is fine, so accept it by hitting return.

Next you are prompted for a passphrase:

Enter passphrase (empty for no passphrase):

Think of a strong, yet memorable one and enter it. (One tip is to think of a phrase, saying, song lyric etc. For example "One small step for man, one giant leap for mankind." Then take the first letters from each word, perhaps substituting digits for letters, to create the passphrase, "Oss4mogl4m.") You will be prompted for your passphrase twice:

Enter same passphrase again: 

When the key-pair creation is completed, you will get some lines of text as confirmation, such as:

Your identification has been saved in /gsb6/ggdagw/.ssh/id_rsa.
Your public key has been saved in /gsb6/ggdagw/.ssh/id_rsa.pub.
The key fingerprint is:
37:7a:b3:81:e2:0e:fa:5e:b2:df:84:a5:fb:f9:e6:f7 ggdagw@dylan.ggy.bris.ac.uk

Distributing Your Public Key

Using ssh-agent

ssh-agent bash

Using ssh-keychain