All modern operating systems (Apple, Linux and Windows 10) now have have native command-line utilities that can be used to copy files to SFTP servers.
These tools can be used to copy files to Department linux login servers for remote file access or for transfering HTML/CSS to upload web content for SFTP servers for web publishing.
Using the command/terminal application on either Windows 10, Apple or Linux computers, execute the following commands from within the local directory you want to copy files from:
Enter the server address information, your Netlink or COSI credentials.
- For web publishing to a personal webhome directory, specify the server as sftp.csc.uvic.ca (or sftp.cs.uvic.ca for COSI domain), and cd to /public_html as the destination path for the file copy.
- For web publishing to a shared group website, specify he server as sftp.csc.uvic.ca (or sftp.cs.uvic.ca for COSI domain), and cd to /htdocs as the destination path.
- For copying data to or from your Department Home directory, connect to one of the Department’s linux login servers as the destination server, you will default the root of your home directory.
- For copying data to or from a COSI Shared Group directory, connect to the COSI linux.cs.uvic.ca login server, and cd to the destination directory /groups/cosi_
$ sftp <username>@sftp.csc.uvic.ca <username>@sftp.csc.uvic.ca's password: xxxxxxxx Connected to sftp.csc.uvic.ca. sftp> cd /public_html sftp> put -r * sftp> bye
The above command connects to the teaching sftp as
<username>, changes to the remote directory /publich_html and performs a recursive copy of all files in the current local of your computer.
Command-line SFTP with SSH-Keys
If you have configured an SSH-KEY, you can specify to use your private key to connect by using the ssh/sftp identity -i parameter in the command line:
$ sftp -i /.ssh/my_key_file user@remote-host
SFTP using Linux GUI File Browser (Nautilus)
Cyberduck is not available for Linux platforms, but users wanting GUI SFTP can use the native Nautilus file browser in the Gnome desktop.
In the Nautilus file browser and click
+ other locations at the bottom of the file browser. The connect to server dialog will open and enter the following connection string into the dialog and click the connect button:
You will be promtpted for your account password. Once completed, a file browser window will open to your
/public_html folder which you can use to drag-and-drop files into using the file browser.
Using SSH-Keys with the Gnome File browser
In order to use SSH-KEYS within Gnome, the keys need to be pre-loaded by the ssh-agent for use by the gnome-keyring-daemon. Use the ssh-add command to pre-load the private ssh-key.
$ ssh-add ~/.ssh/my_key_file
Once the key has been pre-loaded, the Gnome file browser client will automatically try to use the key on future SFTP connection attempts.