Differenze

Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.

Link a questa pagina di confronto

Entrambe le parti precedenti la revisione Revisione precedente
Prossima revisione
Revisione precedente
vlsi:computing_remote [15/04/2013 01:49]
pacher
vlsi:computing_remote [30/07/2013 21:23]
pacher cancellata
Linea 1: Linea 1:
 ====== Accessing computing resources remotely ====== ====== Accessing computing resources remotely ======
  
-[ __[[vlsi:​home|Home]]__ ]+[ __[[vlsi:​home|VLSI Home]]__ ]
 [ __[[vlsi:​workbook|VLSI Design WorkBook]]__ ] [ __[[vlsi:​workbook|VLSI Design WorkBook]]__ ]
 [ __[[vlsi:​computing_main#​contents|Back to index]]__ ] [ __[[vlsi:​computing_main#​contents|Back to index]]__ ]
Linea 25: Linea 25:
 Once you have obtained a VLSI computing account, you are not required to physically ​ Once you have obtained a VLSI computing account, you are not required to physically ​
 work in front of a VLSI machine. As a matter of fact, you can always access your VLSI  work in front of a VLSI machine. As a matter of fact, you can always access your VLSI 
-machine remotely using the [[http://​en.wikipedia.org/​wiki/​Secure_Shell|Secure Shell (SSH)]] ​+machine remotely using the **[[http://​en.wikipedia.org/​wiki/​Secure_Shell|Secure Shell (SSH)]]**
 connection protocol and just work as you would be in front of it. For security issues, ​ connection protocol and just work as you would be in front of it. For security issues, ​
 VLSI and INFN machines allow remote access only through <​nowiki>​SSH</​nowiki>​. Connections VLSI and INFN machines allow remote access only through <​nowiki>​SSH</​nowiki>​. Connections
Linea 562: Linea 562:
  
 **Tunnelling** **Tunnelling**
 +
 +Double-hop ssh tunnel (ssh on one machine, then on another)
 +
 +Situation: A and B are remote hosts. Local machine can SSH into A, but not B. B ONLY accepts SSH connections from A.
 +
 +one SSH from local to A that tunnels from a secondary local port (like 2121) to port 21 on B, and then you can SSH to localhost:​2121 and login on B
 +
 +Un modo ad esempio e':
 +
 +
  
 <​code>​ <​code>​
-ssh+ssh -l username -L 7777:​eltXXX.to.infn.it:​22 zoroastro.to.infn.it cat -
 </​code>​ </​code>​
 +
 +poi la shell rest ain hang, si apre un altro terminale e si mette
 +
 +<​code>​
 +ssh -p 7777 username@localhost
 +</​code>​
 +
 +e funziona!
 +
 +
 +
 +
 +
 +See also //​[[http://​picobit.wordpress.com/​2009/​04/​26/​linux-ssh-forwarding-tunneling-duble-ssh-using-the-console/​]]//​
 +
  
  
Linea 578: Linea 603:
 <​code>​ <​code>​
 cd ~/.ssh cd ~/.ssh
-ssh-keygen+ssh-keygen ​[options]
 </​code>​ </​code>​
  
 generate a key  generate a key 
 +
 +
 +generate a couple of keys, one public and one private with the ''​ssh-keygen''​ command
 +which come with OpenSSH
 +
 +You will be prompted to specify a path (the default one ''​~/​.ssh/​id_rsa''​ works fine) and a **passphrase** (do not
 +use an empty passphrase)
 +
 +
 +<​code>​
 +Generating public/​private rsa key pair.
 +Enter file in which to save the key (/​home/​username/​.ssh/​id_rsa):​ <hit Return to leave default or specify a different path>
 +Enter passphrase (empty for no passphrase):​ <enter a passphrase or leave it empty>
 +Enter same passphrase again: <confirm passphrase>​
 +The key fingerprint is:
 +53:​f8:​08:​27:​20:​a1:​82:​d7:​ad:​ac:​44:​30:​48:​71:​17:​05 username@local.hostname
 +</​code>​
 +
 +
 +
 +After keys has been succesfully generated you have to **copy the public key on the remote system**
 +you want to connect to through <​nowiki>​SSH</​nowiki>​
 +
 +<​code>​
 +ls ~/.ssh
 +</​code>​
 +
 +you can use ''​scp''​ itself,
 +
 +<​code>​
 +cd ~/.ssh
 +scp id_rsa.pub username@remote.hostname:​~/  ​
 +</​code>​
 +
 +
 +login on the remote system, ​
 +
 +<​code>​
 +ssh username@remote.hostname
 +</​code>​
 +
 +move the ''​id.rsa.pub''​ as ''​~/​.ssh/​authorized_keys''​
 +
 +<​code>​
 +mv ~/​id.rsa.pub ~/​.ssh/​authorized_keys
 +</​code>​
 +
 +
 +E questo e' sufficiente,​ loggarsi e immettere il passphrase oppure nulla se non la si e'
 +inserita.
 +
 +
  
 [[http://​www.thegeekstuff.com/​2008/​06/​perform-ssh-and-scp-without-entering-password-on-openssh/​]] [[http://​www.thegeekstuff.com/​2008/​06/​perform-ssh-and-scp-without-entering-password-on-openssh/​]]
 +
 +
 +
 +\\
 +\\
 +**Viewing images from the command line**
 +
 +If you need to view any image but you can only use the terminal, ​
 +use the //Eye of GNOME// image viewer, which is the official image viewer ​
 +for the GNOME Desktop environment and available on all Scientific Linux dictributions.
 +
 +Use the ''​eog''​ command, ​
 +
 +<​code>​
 +which eog 
 +/​usr/​bin/​eog
 +</​code>​
 +
 +
 +To open an image, ​
 +
 +<​code>​
 +cd /​path/​to/​image
 +eog fileName.png
 +</​code>​
 +
 +
 +See also \\
 +[[http://​projects.gnome.org/​eog/​]]
 +
 +
 +
 +
 +