How to use FTP through a SSH connection?

17 views
Skip to first unread message

Spencer Hanson

unread,
Sep 30, 2015, 12:56:55 AM9/30/15
to CU Hackers
Hello, I've been messing around with my ssh server at my house, and I'm wondering if there is any way to use ftp through my ssh client. I'd like to basically be able to connect to localhost:#port through filezilla (or commandline)

I saw this but it looks like I'm not either doing it correctly or it's not working. I do have a working ftp server running on my server, but I'd rather not portforward to make it public, since ssh seems like a valid option.


Does anyone have any ideas or tools I could look into?

Thanks,

Spencer

John Black

unread,
Sep 30, 2015, 1:08:29 AM9/30/15
to cu-ha...@googlegroups.com
Why not just use scp which does file transfer over ssh?

--
You received this message because you are subscribed to the Google Groups "CU Hackers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cu-hackers+...@googlegroups.com.
Visit this group at http://groups.google.com/group/cu-hackers.
To view this discussion on the web visit https://groups.google.com/d/msgid/cu-hackers/dba6b015-453f-4b32-aeed-b12e4b3e726b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Rahm

unread,
Sep 30, 2015, 1:14:04 AM9/30/15
to cu-ha...@googlegroups.com

You can also use sftp. It just uses ssh on the back end. I.e. openssh-server is implicitly an sftp server.

Spencer Hanson

unread,
Sep 30, 2015, 1:16:33 AM9/30/15
to CU Hackers
Haven't heard of scp! I'll check it out. Thanks for the quick reply!

Spencer Hanson

unread,
Sep 30, 2015, 1:24:30 AM9/30/15
to CU Hackers
Works like a charm! Thanks again.

Andy Sayler

unread,
Sep 30, 2015, 2:01:09 AM9/30/15
to cu-ha...@googlegroups.com
Normally, you could use SSH port forwarding to accomplish such tasks, but FTP does not port forward easily do to the fact that it dances across a range of ports for each connection. This is also why firewalling FTP is a PITA, and one of the many reasons FTP should have died many years ago.

But as others have said, don't use FTP at all - sftp is more secure, more advanced, and generally better all around.

And then check out the various sftp-based tools: rsync, sshfs, etc.

-Andy

John Black

unread,
Sep 30, 2015, 2:14:15 AM9/30/15
to cu-ha...@googlegroups.com
I use scp to copy files if that's all I'm doing.  sftp is great if you want the interactive experience of ftp (or if you want to create/delete directories, etc).

scp is generally faster than sftp for simple file copying.  Both tunnel over ssh, and therefore are as secure as ssh itself.


John

Andy Sayler

unread,
Sep 30, 2015, 2:44:49 AM9/30/15
to cu-ha...@googlegroups.com
I don't think I ever really realized that sftp and scp were different subsystems. I just assumed scp was built atop sftp. Learn something every day...

Reply all
Reply to author
Forward
0 new messages