Terminal Setup
First time setup¶
The login process can be simplified significantly with a few easy configurations.
-
In a new local terminal run;
mkdir -p ~/.ssh/sockets
this will create a subdirectory in your home directory to store socket configurations. -
Open your ssh config file (e.g.
nano ~/.ssh/config
to open with the text editornano
) and add the following (replacingusername
with your username):
ControlPath ~/.ssh/control/%C
ControlMaster auto
Host login-0
User <userid>@agresearch.co.nz
Hostname 10.29.107.20
ProxyCommand ssh -YW %h:%p login-0
ServerAliveInterval 300
ServerAliveCountMax 2
ForwardX11 yes
ForwardX11Trusted yes
ControlPath ~/.ssh/control/%C
ControlMaster auto
Host login-1
User <userid>@agresearch.co.nz
Hostname 10.29.107.20
ProxyCommand ssh -YW %h:%p login-1
ServerAliveInterval 300
ServerAliveCountMax 2
ForwardX11 yes
ForwardX11Trusted yes
- Ensure the permissions are correct by
running
chmod 600 ~/.ssh/config
.
Usage¶
Assuming you have followed the setup above you will be able to connect to the clusters directly using;
ssh login-0
What Next?