Linux server1 send file to Linux server2
Posted dream_heheda
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux server1 send file to Linux server2相关的知识,希望对你有一定的参考价值。
需求
Linux服务器1 发文件到Linux 服务器2
step1. Linux server1 generate a pair of key and provide public key with Linux server
ssh-keygen -b 2048 -t rsa -C "<Linux server1 user>@<key name>"
step2. Linux server2 provide below informationask with Linux server1
- FQDN
- Port
- SFTP profile
- File path to receive the file
step3. Linux server2 import public key
- Upload the key file to your sftp profile path, such as /home/users/wasadm/.ssh
- Append public key content to authorized_keys file, such as using command
cat <key name> >> authorized_keys
step4. connectivity test
- Linux server1 connect to Linux server2 with private key:
sftp -i <private key> remoteUser@remoteServer
- Linux server1 send file to Linux server2 with private key:
scp -i <private key> -P 22 <test.txt> remoteUser@remoteServer:<destination path in Linux server2>
以上是关于Linux server1 send file to Linux server2的主要内容,如果未能解决你的问题,请参考以下文章
Linux server1 send file to Linux server2
linux bind,如何配置能够解析不带域名的host主机名。