Sign in to follow this  
ArchG

SSH to Linux, and Sending Files

Recommended Posts

Hello, I'm a Windows User, and have come a custom to the way Visual Studio works, and enjoy programming in it. Problem is, for most of my classes, everything is done on linux (although the code is always platform independent). I can SSH into the linux stations from home, but, to modify things, I have to use stuff like emacs and console line stuff, which is kindof a pain in the ass if you're used to something like Visual Studio. I'm wondering if there is some sort of command or something, where I could send files to my home computer, or FTP the files somewhere, or something like that. Currently right now what i'm doing is using Cygwin with the KDE desktop, and logging in, and emailing them to myself...(which takes about 20 minutes to do, since i'm off campus and it's very slow) Any solution would be helpful, Thanks, ArchG

Share this post


Link to post
Share on other sites
You could set an FTP server and tunnel into it with ssh IE:

$ ssh -L 21:remotehost:21 -luser remotehost

Then FTP to localhost.

You could also set a samba share, but that would be more complex since I think it uses more than one port.

When I do this with VNC there is no noticeable lag, but in my case both connections are relatively fast (ADSL).

OR

Use plain scp:

$ scp filename.txt user@remotehost:~/

would copy filename.txt to user's home directory

$ scp user@remotehost:~/filename.txt .

would copy filename.txt from the remote host user's home to the local current path.

Share this post


Link to post
Share on other sites
Do you mean sftp? sftp is ftp over ssh.

You can log in by:
sftp user@remotehost

Then you can use the commands:
get file.cpp
to get files from the remote computer

mget *.cpp
to get multiple files from the remote computer

put file.cpp
to put a file on the remote computer

mput *.cpp
to put multiple files on the remote computer

cd directory
to change directory on the remote computer

lcd
to change directory on the local computer

ls
to display directory on the remote computer

lls
to display directory on the local computer

and other commands, like pwd, lpwd, mkdir, ...

Share this post


Link to post
Share on other sites
If you are too lazy to use the command line, then go get WinSCP. Makes things fairly easy to transfer over.

Also, be warned that there can be issues when using a file made in vi and transferring it over to VS. But honestly what is so bad about doing classwork directly in console? It really isn't that hard, and is good experience for working with different systems.

Share this post


Link to post
Share on other sites
Perhaps it would be more convenient to use a tool like rsync (over ssh, in this case). It provides a check of the whole file trees on both ends, and to transfer only files (or even parts of them) that have changed. I've never used rsync under windows, but there is a port available.

Share this post


Link to post
Share on other sites
I use unison to sync between my laptop, my home server and my university linux account. Works really well. It's better than rsync for this task because it's designed for syncing interactively both ways. It's about as easy/hard to set up as rsync.

Share this post


Link to post
Share on other sites
Sign in to follow this