使用以下命令:

scp /path/to/local/file username@remote:/path/to/remote/directory/

其中,/path/to/local/file为本地文件的路径,username为远程服务器的用户名,remote为远程服务器的IP地址或域名,/path/to/remote/directory/为远程服务器的目标目录路径。

例如,将本地文件/home/user/test.txt复制到远程服务器192.168.1.100/home/user目录下:

scp /home/user/test.txt username@192.168.1.100:/home/user/

在执行命令时,需要输入远程服务器的密码。


原文地址: https://www.cveoy.top/t/topic/fshi 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录