🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

SSH to Linux, and Sending Files

Started by
5 comments, last by 255 15 years, 8 months ago
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
Advertisement
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.
Can't Visual Studio work over FTP/SSH connections? On Linux, even most simple editors can do that. I suggest you go hunting for a plugin for Visual Studio.

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

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, ...
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.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
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.
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.

This topic is closed to new replies.

Advertisement