User Tools

Site Tools


other:ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
other:ssh [2020/08/03 09:09]
jypeter [Standard usage]
other:ssh [2020/08/05 06:51]
jypeter [Using ssh keys] Added the sections
Line 29: Line 29:
 Note: the following will work in a **Linux** terminal, but can also work in a //​terminal//​ on a **Mac** or on a **Windows 10** computer (''​ssh''​ is directly available in ''​Windows Powershell'',​ ''​Windows Terminal''​ or the old ''​cmd'',​ but it is not the most user-friendly way to use ''​ssh''​ on Windows) Note: the following will work in a **Linux** terminal, but can also work in a //​terminal//​ on a **Mac** or on a **Windows 10** computer (''​ssh''​ is directly available in ''​Windows Powershell'',​ ''​Windows Terminal''​ or the old ''​cmd'',​ but it is not the most user-friendly way to use ''​ssh''​ on Windows)
  
-If you have a Windows computer, it is much easier to use [[#​a_recommended_ssh_client_for_windows|Putty]] for creating an ''​ssh''​ connection+If you have a Windows computer, it is much easier to use [[other:​putty_conf|PuTTY]] for creating an ''​ssh''​ connection
  
 </​WRAP>​ </​WRAP>​
Line 91: Line 91:
 ==== A recommended ssh client for Windows ==== ==== A recommended ssh client for Windows ====
  
-[[other:win10apps#​putty_pageant|Putty]] is a convenient and user-friendly //ssh client// for Windows+[[other:putty_conf|PuTTY]] is a convenient and user-friendly //ssh client// for Windows
  
-===== Just transferring ​files =====+===== Copying ​files between servers/​computers ​=====
  
-Sometimes you just need to copy files from one server to the other. The files can be securely copied //over ssh// with the ''​scp''​ command+Sometimes you just need to copy files from one remote ​server ​(or your desktop) ​to the other. The files can be securely copied //over ssh// with the ''​scp''​ command
  
 Note: if you work with big data files, you should keep the files were they are instead of duplicating them, and move the data processing (your scripts, etc...) to the server where the files are located (e.g. the ciclad server) Note: if you work with big data files, you should keep the files were they are instead of duplicating them, and move the data processing (your scripts, etc...) to the server where the files are located (e.g. the ciclad server)
 +
 +==== Copying files with scp ====
 +
 +<WRAP center round tip 60%>
 +Note: the following will work in a **Linux** terminal, but can also work in a //​terminal//​ on a **Mac** or on a **Windows 10** computer (''​scp''​ is directly available in ''​Windows Powershell'',​ ''​Windows Terminal''​ or the old ''​cmd'',​ but it is not the most user-friendly way to use ''​ssh''​ on Windows)
 +
 +If you have a Windows computer, it is much easier to use [[other:​win10apps#​winscp|WinSCP]] for copying files
 +</​WRAP>​
 +
 +  * **''​scp [options] local_path_or_file [my_login@]remote_server:​remote_path''​**\\ or **''​scp [options] ​ [my_login@]remote_server:​remote_path_or_file local_path''​**
 +    * If your login is the same on the local and remote computer, you can omit the optional ''​my_login@''​ part
 +
 +  * Most common options:
 +    * ''​-p'':​ **preserves modification times**, access times, and modes from the original file. This option is very useful if you want the copied file(s) to have the same date/time as the original file(s). Otherwise, the time will be the time when you copy the file
 +    * ''​-r'':​ **recursively** copy entire directories. **You have to use this option if the source location is a directory**. ''​scp -r''​ will copy the complete content of the directory (including sub-directories)
 +
 +==== A recommended graphical scp client for Windows ====
 +
 +[[other:​win10apps#​winscp|WinSCP]] is a convenient and user-friendly //scp client// for Windows
 +
 +==== Synchronizing directories ====
 +
 +In some cases, you may want to synchronize the content of directories:​
 +  * because you are creating a backup
 +  * because you have lots of files, possibly (very) big, and you don't want to start copying everything again if the copy fails due to temporary network problems
 +  * ...
 +
 +In that case, you should use the ''​rsync''​ command, that will only copy files that are not already in the destination (and that have not changed since the previous copy).
 +
 +''​rsync''​ has lots of complex options and rules, and **should be used carefully** if you do not want to lose files. This page does not cover this topic. Use ''​man rsync''​ or ask somebody
  
 ===== Using ssh keys ===== ===== Using ssh keys =====
 +
 +==== What are ssh keys? ====
 +
 +
 +==== Creating ssh keys ====
 +
 +
 +==== Installing ssh keys ====
 +
 +
 +==== Using the keys ====
 +
 +
 +==== Using an ssh agent ====
 +
  
  
-===== Using an ssh agent ===== 
  
 ===== More... ===== ===== More... =====
other/ssh.txt · Last modified: 2023/05/03 08:32 by jypeter