PDA

View Full Version : SSH Confusion




FlamDrag
Oct 1, 2004, 12:24 AM
Ok folks, I have a new web site going that only allows FTP through an SSH tunnel or something.

I THINK that I've successfully connected to the SSH server in terminal, but is that all I have to do?

Then my FTP program (Transmit) just automatically uses it?

Am I missing a step somewhere?

Thanks in advance, this whole SSH thing is new to me.



Westside guy
Oct 1, 2004, 07:27 PM
Ok folks, I have a new web site going that only allows FTP through an SSH tunnel or something.

Unfortunately this is a rather vague statement. There are places that allow access to FTP only through ssh tunnels, and there are places that allow access through sftp, which is something entirely different. I would hope they're using the latter case.

If sftp rings a bell, the simplest way to transfer files is with a
free program called Fugu (http://rsug.itd.umich.edu/software/fugu/). You can drag-and-drop files to/from your computer from/to the destination computer. You can also type "sftp" from the command line, and use it a lot like a regular ftp command line session.

On the other hand, if they are really tunneling ftp over ssh, that is pretty annoying because the average person will not understand how to do that. Plus FTP is a privileged port, so unless you've got root (or sudo) on the box you work on you won't be able to forward the port.

My suggestion would be to just try connecting using Fugu, and see how it goes. If it doesn't work, you really need to provide specific information about the webserver in question before anyone can really help you. This isn't meant to be a slam - just provide the text (or a URL) from your ISP that talks about transferring files over to the webserver.

tomf87
Oct 1, 2004, 08:45 PM
Unfortunately this is a rather vague statement. There are places that allow access to FTP only through ssh tunnels, and there are places that allow access through sftp, which is something entirely different. I would hope they're using the latter case.

If sftp rings a bell, the simplest way to transfer files is with a
free program called Fugu (http://rsug.itd.umich.edu/software/fugu/). You can drag-and-drop files to/from your computer from/to the destination computer. You can also type "sftp" from the command line, and use it a lot like a regular ftp command line session.

On the other hand, if they are really tunneling ftp over ssh, that is pretty annoying because the average person will not understand how to do that. Plus FTP is a privileged port, so unless you've got root (or sudo) on the box you work on you won't be able to forward the port.

My suggestion would be to just try connecting using Fugu, and see how it goes. If it doesn't work, you really need to provide specific information about the webserver in question before anyone can really help you. This isn't meant to be a slam - just provide the text (or a URL) from your ISP that talks about transferring files over to the webserver.

Another option is to go to Terminal and run:

sftp user@host

where:
user = your username
host = the host you are connecting to

Actually sftp uses the SSH daemon on the server to transfer files. I assume the different one you are talking about is port forwarding through an SSH client. That is not much different than sftp, as they both run over an SSH tunnel. The only major difference I see is in setting up port forwarding.

jeremy.king
Oct 1, 2004, 09:29 PM
I thought SFTP and FTP over SSH were, in fact, one and the same - while SCP uses a different protocol.

Either way, try Fugu, as mentioned and you should be all good. It works just like an FTP program.

yellow
Oct 1, 2004, 10:00 PM
Transmit (version 2.6+ at least) does SFTP.
SFTP uses ssh.
scp also uses ssh.

Westside guy
Oct 1, 2004, 11:30 PM
I thought SFTP and FTP over SSH were, in fact, one and the same - while SCP uses a different protocol.

Both SFTP and SCP are transfer protocols built into SSH. SFTP is designed to be FTP-like, but as tomf87 pointed out it is handled by the sshd daemon running on the server.

On the other hand when you tunnel FTP through SSH, there has to be an actual FTP daemon running on the server. In this case all SSH does is encode and transport the FTP commands to the server, at which point it hands the data off to the FTP daemon. SSH can be used to tunnel any TCP-based protocol - I've used it to secure VNC sessions for instance, as well as SMB. When you're tunneling like this, the program you're running on your computer needs to be set up as if it's connecting to your local computer (localhost) rather than the remote machine.