问题
I want to copy a large file from a Unix server to the Windows clipboard using SSH.
How can this be done?
I can't install any third party application on the server
I tried various options like %y+ But none of them working for me.
UPDATE :
Finally i used scp on windows cygwin and it worked like charm Thanks
回答1:
If you have PuTTY (or any Windows SSH client) just super copy it:
scp username@linuxMachineAddress<linux directory path> C:\Documents\filename.extension
For example:
pscp firdooze@192.160.1.233:/home/firdooze/helloWorld.txt C:\Documents\helloWorld.txt
More read here
回答2:
Like the interactive session with your Unix server, you can also use ssh to execute a command and then quit. With cat, you can print the contents of files on the Unix server. Windows comes with the clip tool that captures output and places it in the clipboard. Voila:
ssh user@server cat /etc/passwd | clip
回答3:
If you would do it with vim, vim could open remote file via scp directly.
try (on windows the command line could be different, but you got the idea)
vim scp://remoteuser@server.tld//path/to/your/large/file
you have to have vim on your local machine (on your windows)
then you could play with registers.
回答4:
If you can't install third party software, you have to do a less <fileName> and copy it out one page at a time. If you can install a different putty client (should be possible, it's a standalone executable, so you should be able to save it to your desktop) There is a modified version of PuTTY that accomplishes this.
来源:https://stackoverflow.com/questions/16856477/copying-file-from-unix-to-windows-clipboard