User Tools

Site Tools


This is an old revision of the document!

Better SSH experience

This page contains some suggestions on how to improve your SSH experience.

Speedup connection with the ssh config file

One can speedup logging in by configuring her/his own ssh client. This will also help in scp-ing data to the cluster.

The configuration example below shows how you can access a machine through another machine with a single ssh command. The scenario is as follows:

 User  --->  machine  ---->  machine ----> machine

And you want to use one single command to login to B or C.

# access
Host hostA
User <username on>
ForwardX11 yes

# directly access
Host hostB
User <Username on>
ForwardX11 yes
# Use this command if A uses Openssh server version < 5.4.
# It requires the program netcat (nc) to be installed on the
# machine.
ProxyCommand ssh -q nc 22

# directly access
Host hostC
User <Username on>
ForwardX11 yes
# Use this command if uses Openssh server version >= 5.4,
# that has native support for tunnelling ssh connections.
ProxyCommand ssh -q -W

Example: My user is florido. In the template above, I would change all the <Username …> to florido.

then to login to I will do:

ssh hostB

And I will have to input 2 passwords: one for, one for

In general you will have to input as many passwords as the number of hops. To overcome this problem, use a private/public ssh keypair technique described below.

Reduce passwords using a private/public ssh key pair

it_tips/ssh.1399643098.txt.gz · Last modified: 2014/05/09 13:44 by florido