Upload Files to Astro

From CsWiki
Jump to: navigation, search

Create A Tunnel

In order to transfer files to and from Astro cluster, you must first create a tunnel. In the examples below I use the user name "yaronw". Don't forget to change the user name if you copy/paste.

Linux & Mac

ssh -L 12345:astro-gw:22 yaronw%astro-gw@gw.cs.huji.ac.il

The first number in command (in this example 12345) is a local port number on your computer and it can be any free port.

Windows

Putty

In the Session category enter host name and port:

Host Name: yaronw%astro-gw@gw.cs.huji.ac.il
Port: 22

Putty session.png

In the SSH category under Tunnels enter Source port and Destination:

Source port: 22222
Destination: astro-gw:22

Putty tunnels.png

Source port can be any number you choose. It's recommended to use a five-digit port number so you won't be using a port that is already in use. Save the configuration for later use.


Rsync

The commands in the examples for rsync are all run on the local computer!
After you run the command you will be prompt for your UNIX password on the cluster.

To rsync files and folders TO the cluster:

rsync -ave "ssh -p 12345" /path/on/local/machine  yaronw@localhost:/path/on/cluster

To rsync files and folders FROM the cluster:

rsync -ave "ssh -p 12345" yaronw@localhost:/path/on/cluster /path/on/local/machine 

SCP

The commands in the examples for scp are all run on the local computer!
After you run the command you will be prompt for your UNIX password on the cluster.

To scp files and folders TO the cluster:

scp -P 12345 /path/on/local/machine  yaronw@localhost:/path/on/cluster

To scp files and folders FROM the cluster:

scp -P 12345 yaronw@localhost:/path/on/cluster /path/on/local/machine

FileZilla

Download: FileZilla

Create a tunnel to Astro cluster:

ssh -L 12345:astro-gw:22 yaronw%astro-gw@gw.cs.huji.ac.il


Create a new site and in the general tab and enter the following details:

Host: localhost
Port: the local port you used to create a tunnel (in this example 12345).
Protocol: SFTP
Logon type: ask for password.

FileZilla site manager.png

Press connect and enter your user name (without %astro-gw) and Unix password (not OTP).

Filezilla user and pass.png

Windows

To upload files from your local Windows station you can use WinScp.
Download: WinScp
Press on "New Site" and enter this details:

File protocol: SFTP
Host name: astro-gw
Port number: 22
User name: YOUR_USER_NAME

WinScp login settings.png

Press "Advanced" and under "Connection" select "Tunnel" and enter the following details:

Select "Connect through ssh tunnel"
Host name: gw.cs.huji.ac.il
Port number: 22
User name: YOUR_USER_NAME%astro-gw

WinScp advanced settings.png

Press OK and SAVE. You can connect now by pressing Login.

Winscp login.png