Changes

Jump to: navigation, search

SSH

556 bytes added, 19:05, 9 December 2023
Using SSH for File Transfer
= Using SSH for File Transfer =
SSH provides two mechanisms for file transfer: ''scp'' and ''sftp''. You can use these from the command line using the OpenSSH software (installed by default in most MacOS, Windows, and Linux systems) or you can use a graphical tool that uses these protocols.
The following instructions are for using the OpenSSH version of scp/sftp from the command line:
== scp - Secure Copy ==
The options are the same as for the ssh command, except that to specify a port number, use <code>-P</code (capital) instead of <code>-p</code> (lowercase).
 
For example:
 
# Copies the file 'test5' from ~/scripts on Matrix to the local directory
scp '''myuserid'''@matrix.senecacollege.ca:scripts/test5 .
 
# Copy the file 'test6' from the current directory to ~ on Matrix
scp test5 '''myuserid'''@matrix.senecacollege.ca:.
Many Linux graphical file managers, such as the GNOME ''Nautilus'' and KDE ''Konqueror'' programs, know how to manage files remotely using the ssh/scp/sftp protocols. For example, on GNOME, you can select the menu option Places>Connect to Server, enter the connection details, and view a file management window on a remote server. You can then rename, copy, move, and delete files using drag-and-drop operations (for example, you can copy a file by dragging it from your desktop to the remote window). You can also create bookmarks for rapid access to remote filesystems at a later date.
 
= Using SSH with Public-Key Authentication =

Navigation menu