|
|
Institute of Technology One Stop Directories Search U of M |
School of Mathematics
Obtaining and Using Secure Shell (SSH) |
|
Printing, E-Mail |
|
Ssh is used for encrypted point to point terminals and data copying across the internet.
Ssh 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.
If the unix command line is new to you, pick up a book on Unix from a local library. If ssh, scp and rsync are new to you, check their manual pages by running a command like man ssh. For technical details, see RFC 4251: The Secure Shell (SSH) Protocol Architecture (and RFCs 4250, 4252-4254).
Remote Shells with SSHTo get a terminal shell on the remote computer shell.example.edu with a username johndoe, you can open a terminal on your local computer and run the command: "ssh johndoe@shell.example.edu". Then you'll be prompted to enter your password.The Fedora 8 Linux distribution has terminals available in the "Applications > System Tools" menu. Mac OS X keeps the Terminal application in the folder "/Applications/Utilities/". Windows users generally use a program like PuTTY, and will enter the hostname in the initial dialog window, click "ok" and enter the username and password on the terminal window that opens up. If you have a specific hostname like birch.math.umn.edu just replace that hostname for shell.example.edu in the command above.
Remote graphical environment with NX ClientTo get the complete graphical environment on a remote linux machine enzo.math.umn.edu with username johndoe, you'll need to download the NX Client software for your computer. You can obtain the client software at http://nomachine.com/download.php. Once you have the client installed on your computer, you'll need to choose a session name and a hostname to login to. The session name merely designates under what name your configuration information will be saved. The hostname should be the name of the machine you're trying to log in to, like enzo.math.umn.edu. Be sure to choose your desktop environment (Gnome or KDE), and then login with your username (eg johndoe) and your password.
File Transfer with SFTPCommand Line SFTPTo copy a file to a remote host using the command line, use a command to specify the source to copy from and the destination to copy to.scp options source destinationRemote files are specified with a username, a host and a file (or directory). user@hostname:fileIn the case below the -r option enables recursion so the directory foo and it's contents will be copied. scp -r foo/ jdoe@shell.example.edu:~You can also copy from a remote host to a local host... scp -r jdoe@shell.example.edu:~/foo ~ Drag and Drop SFTPDesktop 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 sofware will show two panels, one panel. Then you can drag and drop between the panels and your desktop, file manager, or finder window.See the web site for the software you plan to use. Sftp Connection as a Mounted DriveSoftware is available to mount the sftp connection as a network drive. The advantage over a command line program, or a a drag and drop sftp client is that with sftp mounted as a drive, desktop apps can use remote files directly.SSH SoftwareVarious free (or free for noncommercial use) ssh clients are available for different operating systems:UnixOpenSSH, DropBear SSH or Lsh. The OpenSSH page also has pointers to clients for various other platforms, and may be more current than this page.Graphical and text user interfaces are available for ssh with the gftp and midnight commander software. Many Linux desktops use Gnome for their desktop software, and can make sftp connections with the Nautilus file manager. Just find the "Location:" bar and put the sftp URL in it (something like sftp://jdoe@foobar.example.edu/home/jdoe). For a more permanent connection, go to the menu File > Connect to Server..., select the service type SSH and fill in fields with values like the previous URL. One drawback of Nautilus network mounts is currently they aren't available from the command line shells. To have ssh/sftp mounts available in the command line you would want to use FUSE which can even set in /etc/fstab. WindowsPuTTY which includes a (command-line) scp client.There's a nice Windows scp client which is described at WinSCP. You should use this instead of ftp, and it will work to connect to most unix machines. SftpDrive lets you connect an sftp site to a drive letter on your Windows desktop. If you would like to run X applications on your local windows desktop from a Unix machine using Putty and XWin32 please read this page. Macs OS 9Try MacSSH which supports version 2 of the SSH protocol. If you need SSHv1 suport, try NiftySsh.Macs OS XYou can use Fugu, or MacFusion to transfer files using a graphical interface. MacFusion integrates with the OS X finder and will freeze the desktop finder on 10.4 or earlier, so run MacFusion on 10.5 or higher. The shareware program Fetch is also available.If you don't want to install software, or prefer using a command line, use the program /Applications/Utilities/Terminal to use the unix commmand line ssh and scp commands. Public Host KeysIt is wise, although not strictly necessary, to pre-install public host keys. If you'd like to do so, or if you'd like to check if a machine's key has really changed, the public host keys for the various math systems are collected here: For OpenSSH ssh2 clients: ssh_known_hosts2.The University of Minnesota Supercomputing Institute maintains a ssh information page with links to many different client implementaions of ssh.
| ||||||||||||||||||||||||||||||||