使用Secure Copy Protocol传输文件

1.确认开启ssh服务

  sudo apt-get install openssh-server

  sudo systemctl enable ssh

2.使用scp命令

  scp /path/to/local/file username@destination_host:/path/to/destination/directory

    将本地文件传输到远程虚拟机。

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

    从远程虚拟机获取文件并保存到本地目录。

posted @ 2023-10-25 17:35  花都八达鸟  阅读(45)  评论(0)    收藏  举报