Securely connecting to a remote machineTransfering files
Securely connecting to a remote machine
- Connecting to a remote windows machine can be difficult and sometimes these services are blocked by firewalls. This can be performed with windows "remote administration" tools, or by installing other tools on the system. »http://tightvnc.org/ is one way to do this. This service must be setup on the server, and a VNC client program must be used on the client. This has the advantage that one connect from any operating system to another. Keep in mind that VNC can be slow, and only one person can use the (windows) computer at a time. There are also security concerns about VNC, »ultraVNC uses encryption but most others do not.
- Connecting to a remote Unix/Linux machine is actually much easier. If both machines have X windows, this is easy and quite secure. Simply use SSH to connect to the remote machine, and include the options "-X" (to forward that graphics to the local machines) and "-C" (to compress the data stream, seems to work well at Dal). Here are some examples (replace "user" with your username):
ssh -X -C user@lahave.ocean.dal.ca
ssh -X -C user@fox.ocean.dal.ca
- Once you are connected (after giving the password), you can run a program that exists on the remote machine, and have the graphics displayed on your local machine. This is much more efficient, robust, and takes far less time than using VNC.
- If you are trying to connect to a remote Unix/Linux machine from a windows machine, and don't want to use VNC, you can easily use the SSH method. You will need a X server on your windows machine. »http://www.cygwin.com offers an X server along with hundreds of excellent open source command line tools for no cost (make sure you get the proper packages for the X windows version of Cygwin). This is a big download, so it will take some time. Once Cygwin is installed, check to see that the X windows works by typing "startx". A gray window with a "X" for a cursor should show up, and display three terminals. Click on one of these terminals, and use it as you would a normal terminal. Now the following command. The x windows graphics should be forwarded to your machine.
ssh -X -C user@lahave.ocean.dal.ca
- A new way of connecting to a Linux or Unix machine is with »NX. Its similar to VNC, but much quicker (it can even be used with a dial up modem) and easier to use. Additionally it integrates filesharing (using smb) and multimedia all in a secure SSH tunnel.
- An NX server must be installed on the server machine. There is an open source NX server available »FreeNX for Linux, but the commercial servers ($) for Linux, Solaris, Windows, etc are available from »http://www.nomachine.com.
Transfering files
- Using a program on a remote machine is handy, but you'll also need to transfer the files. The typical ways of doing this are:
- FTP, which is fast and reliable but very insecure because passwords are in plain text.
- SMB, or network neighborhood in windows. Not as bad as FTP because it can use encryption, and is handy for windows machines. Unix/Linux machines can use this protocol quite nicely with »http://samba.org/. If the Unix/Linux machine is acting as a server, Samba must be properly configured on it. If it is acting as the client, Samba simply needs to be installed. The program "xsmbrowser" or Konqueror (type "smb:/" in the location bar, without quotes) can be used to transfer files with windows machines. SMB shares can be mounted on a Linux machine with Samba, by using the command line tool "smbmount" or with the GUI program LinNeighborhood.
- NFS, the old network protocol for Unix machines. Takes a bit of setup, and is quite insecure unless special steps are taken.
- There are newer ways of transfering files, such as:
- SFTP, uses SSH to transfer data. Quite secure, and easy to use. The best windows client is the »SSH GUI sftp client »(ssh.com download site) (free for non-commercial use) from ssh.com. Using SFTP in Linux is easy, robust and fast. Simply type "fish://user@lahave.ocean.dal.ca" in the location bar in the file browser (Konqueror), and it will allow easy GUI transfering of files.
- If you are connecting from a Unix machine to a Linux machine (or another Unix machine), and both have SSH installed, you can use the command line version of SFTP. It is almost identical to the FTP command line program. Beware that the programs sftp and scp have been a real pain in the past, failing on large files for unknown reasons. The fish trick, or the windows sftp client work much better on large files.
- Also look at the techniques discussed in RemoteBackups, which discuss the use of rsync, and tar over ssh. These are useful for complicated directories with large files (as large or larger than several gigabytes).