Project

General

Profile

Vm access » History » Version 1

Herve Caumont, 2013-06-19 18:05

1 1 Herve Caumont
h1. SSH Connexion
2
3
{{>toc}}
4
5
Connect to your sandbox IP provided in your registration email.
6
Access makes use of your private keys with SSH.
7
8
h2. 1 Access to your Sandbox
9
10
The user (PI) who wants to access the VM, can do so by using his existing X.509 certificate. It is foreseen to generate these keys automatically when a sandbox instance is requested and make them downloadable from the portal interface. But for completeness, the manual steps involved for Unix and Windows are described below:
11
12
h3. *Unix / Linux*
13
14
* The user downloads his X.509 certificate from the user management portal (e.g. in PEM format), either with encrypted private key (recommended) or unencrypted private key (not recommended)
15
* On the command line, the user can now directly access the VM using:
16
17
<pre>ssh -i <username>.pem <username>@<sandboxhost></pre>
18
19
Depending on the downloaded format, the user has to provide his passphrase (if encrypted key was downloaded) or not (if the key was downloaded unencrypted).
20
21
h3. *Windows (using putty)*
22
23
If the user wants to login from Windows using putty (a well-known freely available ssh client), the key must be converted into a putty-compatible format first:
24
25
* The user must download his X.509 certificate from in PEM format [*with unencrypted key*].
26
* From the file, the private key must be extracted manually (using a text editor): Copy the part
27
28
<pre>-----BEGIN RSA PRIVATE KEY-----
29
MII....
30
-----END RSA PRIVATE KEY-----</pre>
31
32
and paste it into a new file named e.g. <user>.private. Make sure this file is in a secure and safe place.
33
34
* This private key must now be imported with "puttygen":http://the.earth.li/~sgtatham/putty/latest/x86/puttygen.exe either on the command line:
35
36
<pre>puttygen <user>.private</pre>
37
38
> or using the import or load function in puttygen. The import should succeed with the following message:
39
!/attachments/download/5/Screen%20Shot%202013-03-19%20at%2009.22.54.png!
40
41
* The file must now be saved as private key either with (recommended) or without (not recommended) passphrase. Preferably name the resulting key <user>.ppk by clicking the "Save private key" button in the screen below: 
42
!/attachments/download/6/Screen%20Shot%202013-03-19%20at%2009.24.54.png!
43
44
* Now the user can access the VM with "putty":http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe in the command line:
45
<pre>
46
putty –I <user>.ppk <user>@<sandboxhost>
47
</pre>
48
or save the corresponding info in a "Pageant":http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe session with the following four steps: In the session dialog, the "Host Name (or IP address)" field needs to be set to &lt;sandboxhost&gt; (Protocol SSH, Port 22):
49
> !http://controller.ciop.terradue.com/attachments/download/3/Untitled3.png!
50
51
* The, <user> must be added to the "Auto-login username" field in the Connection dialog:
52
> !http://controller.ciop.terradue.com/attachments/download/4/Untitled4.png!
53
and the created private key file needs to be referenced in the "Private key file for authentication" field of the Auth dialog:
54
> !http://controller.ciop.terradue.com/attachments/download/5/Untitled5.png!
55
Finally, the session can be saved (Session dialog) or just opened (Open button below).
56
57
* Make sure that the unencrypted X.509 PEM certificate is deleted (or at least stored in a secure and safe location) after this setup. The X.590 PEM certificate is not used to access the system with putty. Only the generated *<user>.ppk* file is needed.