Smart way to copy multiple files from different paths usinc scp

后端 未结 5 861
北荒
北荒 2021-02-08 13:04

I would like to know an easy way to use scp to copy files and folders that are present in different paths on my file system. The ssh destination server requests a password and I

5条回答
  •  清酒与你
    2021-02-08 13:36

    create a key pair, copy the public key to the server side.

    ssh-keygen -t rsa
    

    Append content inside the file ~/.ssh/identity.pub to file ~/.ssh/authorized_keys2 of server side user. You need not to type password anymore.

    However, be careful! anybody who can access your "local account" can "ssh" to the server without password as well.

提交回复
热议问题