SSH tunneling can be used to secure copy (scp) files to the clusters from your local
computer (and vice versa) without having to copy them on to the intermediary bastion host.
This page contains instructions on how to use SSH tunneling on the HPC clusters to
secure copy (scp) the files.
You can do one of the following two methods to secure copy (scp)
the files from/to clusters to/from your home computer through tunneling.
1. Put these lines in your ~/.ssh/config file on your personal linux machine. If you don't have this file "config", create one.
Host hpctunnel
HostName hpc.es.its.nyu.edu
LocalForward 8020 usq.es.its.nyu.edu:22
LocalForward 8021 bowery.es.its.nyu.edu:22
LocalForward 8022 cardiac1.es.its.nyu.edu:22
User UserName
Host usq
HostName localhost
Port 8020
ForwardX11 yes
User UserName
Host bowery
HostName localhost
Port 8021
ForwardX11 yes
User UserName
Host cardiac1
HostName localhost
Port 8022
ForwardX11 yes
User UserName
2. Create a tunnel to the cluster you want to connect from your computer
through hpc.es.its.nyu.edu. Keep this terminal window alive. It should be
open until you are done with scp or ssh. You should open a new terminal
window for scp or ssh.
$ ssh hpctunnel
3. Open a new terminal window.
4. Copy the files from your desktop or laptop to
the clusters. This will write the file filename to your /home directory
on the cluster, "." means to keep the same name on the cluster.
Substitute bowery or cardiac1 for usqif writing to one of those clusters.
$ scp filename usq:~/.
5. Alternatively, copy files from the clusters to your desktop or laptop:
$ scp usq:~/filename .
No comments:
Post a Comment