我已经通过SSH连接到服务器。如何使用SCP和当前的SSH连接将文件从服务器传输到我所连接的机器上?
你可以使用zssh(一种用于ssh的类似zmodem的应用程序)。
但是,如果你只是想避免再次提示输入ssh密码,只需将客户端主机公钥(通过运行ssh-keygen生成一次)放在服务器的~/.ssh/authorized_keys中即可。
来自“apt-cache show zssh”:
Description: interactive file transfers over ssh
zssh (Zmodem SSH) is a program for interactively transferring files to a
remote machine while using the secure shell (ssh). It is intended to
be a convenient alternative to scp, allowing to transfer files without
having to open another session and re-authenticate oneself.