Secure Shell (SSH) for Remote Access and File Transfer
SSH is used for encrypted point to point terminals and data copying across the internet.
It can be used for getting command line terminals to remote computers (similar to telnet) or to securely copy data using the scp command.
SSH is more secure than it's telnet and ftp predecessors.
Other remote access guides around the U of M...
Remote Shells with SSH
From a Linux machine
Generally you are going to use SSH to open a remote shell on a Linux
machine. To connect to a remote Linux machine from Ubuntu Linux, click
on the Terminal icon in the list of shortcuts on the left side of the
screen. You can also click on the Ubuntu icon in the upper-left and
search for 'terminal'. Once you have a terminal open, run a command
like this: "ssh firstname.lastname@example.org" with your University login
as the username. Then you'll be prompted to enter your password. If
you'd like, replace 'remote.math.umn.edu' with a hostname from the
Ubuntu and most other Linux distributions have an OpenSSH client installed automatically. Visit the
OpenSSH homepage to read its complete manual or type 'man ssh' in a
terminal for a summary.
From a Mac OS X machine
Mac OS X also has an OpenSSH client built-in. You can find it under Applications -> Utilities ->
Terminal. Use the same "ssh email@example.com" syntax to
From a Windows machine
One of the best, free Windows SSH clients is PuTTY. Connecting with
PuTTY works a little differently.
- Download and open the PuTTY client.
- Switch the Protocol to SSH.
- Enter a hostname (the computer you want to connect to).
- Type in a name for this connection under Saved Sessions.
- Click 'Save'.
- Double-click on the new saved session to open the SSH connection.
- You'll be prompted for your username and password.
Running Graphical Applications over SSH
SSH is text only by default. To run applications that use graphics
over SSH add a '-Y' flag to your Linux or Mac OS X SSH client command,
such as 'ssh -Y firstname.lastname@example.org'. For Windows, additional
software is required. See X Forwarding with PuTTY on Windows. X Forwarding over SSH only supports a
single application at a time and has limited compression so it's
generally only fast on a local network.
For a full desktop graphical environment that's efficient enough to
work from off-campus broadband internet, see FastX.
File Transfer with SFTP
Command Line SCP
Remote files are specified with a username, a host and a file (or directory): user@hostname:file
- Copy from a local file to a remote host using the command line: scp foobar.txt email@example.com:foobar.txt
- Copy recursively from child directories: scp -r foo/ firstname.lastname@example.org:~
- Copy from a remote host to a local host: scp -r email@example.com:~/foo
Take a look at sftp and rsync after getting familiar with scp.
Drag and Drop SFTP
Desktop programs are available that let you drag and drop files between remote hosts and your desktop.
Often they'll have you specify the user, host and password on an initial config screen.
After connecting, the SFTP software will show one or two panels: one
panel will contain the remote file system. Then you can drag and drop
local files from either the other panel if it exists or the operating
system's folders or desktop.
Popular options for SFTP programs are WinSCP for Windows, Cyberduck
for Mac and Filezilla for Linux.