• Using scp, copy a file from the remote VM where the SSH daemon is running to the local machine, in the current directory.
时间: 2024-02-24 19:57:21 浏览: 26
Sure, here's the command to copy a file from a remote VM to the local machine using scp:
```
scp user@remote:/path/to/file /path/to/local/directory
```
Replace `user` with the username you use to SSH into the remote VM, `remote` with the IP address or hostname of the remote VM, `/path/to/file` with the path to the file you want to copy, and `/path/to/local/directory` with the path to the directory on your local machine where you want to copy the file.
For example, if you want to copy a file called `example.txt` from the remote VM to the current directory on your local machine, you can use the following command:
```
scp user@remote:/path/to/example.txt .
```
Note the `.` at the end, which indicates the current directory.