I'm new to SSH stuff, linux, etc, but it's what my University uses for my introductory computer science class.

With that in mind, how do I save a file I opened from my University's server in PuTTY to my local computer? It's just a .cpp file and what I usually do is copy and paste from vim to notepad and save it as a .cpp, but this particular file does not want to copy and paste for some reason. So I might have to actually save the file itself from the server directly to my computer.

How would I do this?

Thank you.

  • Have you considered asking your professor/TA the best way to get files off the server? Likely there is some sort of network share accessible from both the server and the university network; or an FTP/SCP login, or any number of things we can only speculate. – Ben Oct 1 '15 at 22:37

but this particular file does not want to copy and paste for some reason
That sounds impossible. With putty, you select the part you want with your mouse and it's automatically saved to clipboard, you then just need to paste it somewhere else with Control v

this method is recommended: you can run python -m SimpleHTTPServer 8080 from PuTTY to start a simple HTTP server, then use your browser to open http://linux-server:8080 , you'll see a list of files of the directory from which you run the python command. then you can download the file over HTTP.

Or you can use filezilla or winscp to download the file.

  • Is there a reason why it won't copy and paste? Apparently all my files can't copy and paste anymore for some reason. I tried with another file I needed to turn in and that didn't work either. Does it have to do something with my putting :set paste in my command? @DavidDai – malabiguel Sep 30 '15 at 1:34
  • @MiguelAlabastro Copying things out of PuTTY has nothing to do with VIM. no matter what is running within PuTTY, whether it's VIM or more or cat, the method is always the same. Drag-to-select -> paste to notepad or whatever. that's it. – David Dai Sep 30 '15 at 1:36
  • Hmmm. That's weird. In that case, I'll play with it around more. Thank you for the help. I just ended up using winscp, and that worked wonderfully. – malabiguel Sep 30 '15 at 1:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.