SSH - mishyta/education GitHub Wiki

scp

  • How to copy a SSH file from a local machine to a remote server:
    scp [path to file] [usrname]@[srvname/ip]:[path to file]
    example:
    scp /home/usr/f.file [email protected]:/home
    copy 'f.file' from '/home/usr/' to server '10.10.0.1' with user 'root' in to directery '/home'
  • How to copy files from a remote server to a local computer:
    scp [usrname]@[srvname/ip]:[path to file] [path to file]
    example:
    scp [email protected]:/home/f.file.txt /home/usr
    copy to local machine in to '/home/usr' 'f.file' from directory '/home/usr' in server '10.10.0.1' with user 'root'
  • How to download a folder with all files and subfolders:
    scp -r [source] [recipient]