你在 gateway 上面开 ssh tunnel. e.g. ssh -L 8022:file-server:22 gateway Then when you connect to 8022 port, the local ssh will connect to gateway sshd. The gateway sshd will open a socket connect to file server at port 22. As effect you now have a tcp port to connect to file server directly, your local port 8022. Then you just copy files over that port as if the file server has an ssh port open at your local 8022.