## page was renamed from guides/file-storage/sftp = Accessing your files remotely using Secure Copy (SCP) / Secure FTP (SFTP) = All departmental Linux machines running a standard CSG build are running OpenSSH servers which, in addition to allowing users to obtain remote shell sessions, also allow secure access to local and network filesystems via the [[http://en.wikipedia.org/wiki/Secure_copy|`scp` (Secure Copy)]] protocol. (`scp` is similar to and supercedes the `rcp` Remote Copy program. In addition, Linux servers in DoC support [[http://en.wikipedia.org/wiki/SSH_file_transfer_protocol|Secure FTP (SFTP)]] protocols, which supersede the old FTP protocol. Access to some hosts is restricted to specific groups of users, in general please check whether the host you want to use allows you to ssh into it first before trying scp/sftp with it. Also, note that attempting to use SSH, SFTP or other similar services with `doc.ic.ac.uk` (without any host specified) will ''not'' work. == From the Unix command-line == If you have a Unix command-line available to you -- e.g. you're using a Linux terminal, or are running some variant of Mac OS X -- then you should have the standard OpenSSH tools available to you. Some example incantations: * Connect as `jbloggs` on `shell1.doc.ic.ac.uk`, and copy a file to your local machine: * `scp jbloggs@shell1.doc.ic.ac.uk:`''file/in/home/directory'' ''local/path/here'' * Connect as `jbloggs` on `shell1.doc.ic.ac.uk`, and upload a local file to `/tmp` on that host: * `scp` ''local/file/here'' `jbloggs@shell1.doc.ic.ac.uk:`''/tmp/'' Please note: scp will not warn you if a destination file already exists: if there is a clash, the destination file will be over-written. There are several useful options for scp: '-C' enables compression, '-r' allows one to recursively copy directories and '-c' is used to specify the underlying encryption cipher. These options can be combined - for example: {{{ scp -Cr -c blowfish-cbc ~/LargeTextFileResultsFolder jbloggs@shell1.doc.ic.ac.uk:Documents }}} You can also use 'glob' patterns ('*' and '?') with scp but these characters may need to be escaped (that is, preceded with '\') in order to avoid being expanded or misinterpreted by both the local and remote shell. Please see the `scp` and `sftp` manual pages for further details (e.g. `man scp`). You may find [[http://www.cyberduck.ch|cyberduck]] to be a useful scp GUI under OS X. == From a GNOME desktop == The Nautilus file-browser allows you to connect to remote SFTP services. From the '''Places''' menu on the desktop, select '''Connect to Server...'''. In the dialog that appears, select the following options: * Service type: SSH * Server: `sftp.doc.ic.ac.uk` Under "Optional information", you should also set: * User Name: (put your username here, e.g. `jbloggs`) On your first connection, you will likely be prompted to verify the identify of the remote computer. You can verify the authenticity of a provided fingerprint by checking it against our [[https://www.doc.ic.ac.uk/csg-res/dynamic/secure/fingerprints|central list of SSH server fingerprints]]. == From a Windows client == Windows clients do not, as standard, ship with the ability to interact with SSH services. You will most likely need to install some third-party application. The following tools are frequently used: * Putty: http://www.chiark.greenend.org.uk/~sgtatham/putty/ is recommended. * SSH Corporation's graphical SSH/SFTP client. Sadly, SSH Corp have [[http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html|discontinued support]] for the free version of their tools and are no-longer hosting copies on their FTP service. However, we have a local copy, which anyone is allowed to use free-of-charge for evaluation, non-commercial, or University use: * http://www.doc.ic.ac.uk/csg-res/software/ssh.com/SSHSecureShellClient-3.2.5.exe ([[https://www.doc.ic.ac.uk/csg-res/software/ssh.com/SSHSecureShellClient-3.2.5.exe.sig-gpg|GPG Signature]]) * MD5SUM: `02af59d90a0fdbf28bd540b65b85dec3` * SHA1SUM: `13abbc16948980f82e2b548c4323151cfce472de` * OpenSSH, via Cygwin: http://cygwin.com/