Secure SHell
What are SSH, SCP and SFTP
SSH, Secure Shell, is a program you can use to connect to another computer on the internet. The information sent between the two computers by ssh is encrypted, so that it cannot be read by others. SCP offers command line file transfer based on the same encryption as SSH. SFTP also offers encrypted file transfer, but with an interactive user interface. This means that you can browse files and folders and select those you want to transfer.
SSH works, but not SFTP and SCP
If you get an error message like "Received message too long 1466459502" when trying to use SFTP, it probably is because something that prints out text is added to the file .bashrc. Note that it is the file .bashrc on the system towards which you are running SFTP. Modify the file so that the text is printed only when there is a terminal associated with the session, as in this example:
if [ -n "$TTY" ]; then fortune fi
The above also holds for SCP, but then there is no error message; you will probably only see the text that is printed by .bashrc, and no files are copied.
Fetching SSH and SFTP
Unix/Linux
- OpenSSH - Is usually preinstalled.
Microsoft Windows
Visit our page about recommended free software for a list of recommended SSH software.
Apple macOS
The commandline-version of SSH is included with the OS.
Visit our page about recommended free software for a list of recommended SSH software.
Using SSH and SFTP
SSH/SCP Windows
- Speeding up the SSH login after the installation of Service Pack 2 for Windows XP.
SSH/SCP Unix
- Log in
- ssh -l user computer
- Example: ssh -l abcd1234 celsius.it.uu.se
- Copy a file to another computer
- scp local_file user@computer:file
- Copy a file from another computer
- scp user@computer:file local_file
SSH/SCP Mac
SCP (Text based)
- As steps 1 and 2 for ssh
- Click "Scp..." (if the button is not active, first do step 3 for ssh above)
- If you want to send files to the SUN computer:
- Select "Send Files/Folders" at the top of the dialog window.
- Click "Add file/folder" in order to select which files on the Mac you want to transfer.
- "Destination path" should be the name of the folder (under your home folder on the SUM system) to which you want to transfer the files, e.g. programming/introLab. If no destination path is entered the files will end up in your home folder.
- If you want to fetch files from the SUN system:
- Select "Receive Files/Folders" at the top of the dialog window.
- "Source file" should contain the names of the files you want to fetch from the SUN system, e.g. documents/letter.doc. The full path must be given if you want to fetch files from outside of your home folder.
- On the macen you must select the folder you want to put the copied files into. Click "Pick folder" under "Download folder".
- Clic "Start Copy". A dialog box prompting for the user name and password for the SUN system appears.
SFTP using Fugu
- Pick a machine to connect to ( list here )
- Enter your username as shown in the picture
- Press "Connect".
- Enter your unix password when prompted
- You will now see your unix file system