zvi: self-portrait: short, fat, black dyke in bunny slippers (Default)
still kind of a stealthy love ninja ([personal profile] zvi) wrote in [site community profile] dw_dev_training2009-09-30 08:13 pm
Entry tags:

Extremely naive question about working with SSH

Okay, when I have a patchfile on my dreamhack, how do I get it out of my dreamhack?

That is to say, when people have asked me to pastebin a file to them, I've been running less on the file, copying each screen, and adding them all together until they make the whole file and then posting it to pastebin.

I know this doesn't transfer files with 100% accuracy to pastebin, but it's usually good enough. However, there has to be a better way to get a file off the dreamhack and onto my local computer, so I can upload it to bugzilla. I just can't, for the life of me, figure out what that better way might be.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2009-10-01 12:40 am (UTC)(link)
Another way you can do it, as well as Mark's method above, is to use a program like WinSCP (if you're using Windows) or some other program that can browse SFTP. That'll let you download things onto your computer.
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2009-10-01 10:51 am (UTC)(link)
Ah, right. I use Linux too as my main OS, but I just assume most people don't. ;p

I don't use sshfs as suggested by some commenters, mostly because I'd probably forget to unmount it or something and then if I mounted it in the wrong place updatedb would start indexing it next morning. ;p What I actually tend to do is either scp or a combination of ssh+tar, such as:

ssh dh-sophie@hack.dreamwidth.net "cd somedir; tar zc *" | tar zxv

I do this when I need to transfer multiple files. since I've found scp to be abysmally slow at that, if there are a lot of files, even with compression on.

Hope that helps. :)