SSH to Maui/Mahuika
Add the following to ~/.ssh/config
Host p7login User seb56 HostName p7login-rcc.canterbury.ac.nz ServerAliveInterval 300 ServerAliveCountMax 2 Host hypocentre User seb56 HostName hypocentre ProxyCommand ssh -W %h:%p p7login ServerAliveInterval 300 ServerAliveCountMax 2 ControlMaster auto ControlMaster no ControlPath ~/.ssh/sockets/ssh_mux_%h_%p_%r ControlPersist 1
Run the following two lines of command, one at a time. Enter your UC password for the first command then your Hypocentre password for the second.
It will add your public key to the host so that you don't need to enter password again.
cat ~/.ssh/id_rsa.pub | ssh p7login "cat >> ~/.ssh/authorized_keys" cat ~/.ssh/id_rsa.pub | ssh hypocentre "cat >> ~/.ssh/authorized_keys"
Test SSH connection to Hypocentre.
(python3_maui) baes@maui01: ~$ ssh hypocentre (py365) seb56@hypocentre ~ $
This means you can remotely copy files from NeSI to Hypocentre. Suppose you have "hello" in your currently directory and you want to copy it to your home directory at Hypocentre.
(python3_maui) baes@maui01: ~$ scp ./hello hypocentre:~/ hello 100% 12 0.0KB/s 00:00