Ask Slashdot: Secure FTP?
Tobbe Johansson asks:
"I would like to put a secure layer between
my FTP-daemon and the network. I have
searched for a program that
encrypts/decrypts the port where my FTP is
running but I have not been able to find
anything that seems to work. Can anyone help
me?"
try here for various ssl based apps
ftp://ftp.psy.uq.oz.au/pub/Crypto/SSLapp s/
I've looked at the source code for ftp before
and I'm pretty sure it doesn't use UDP.
FTP uses TCP exlusively.
In non-passive mode (the default for command line programs) it opens a new TCP connection for each data transfer, from the server to you.
In passive mode it goes the other way.
But they are all TCP connections.
There actually is a protocol called TFTP (trivial file transfer protocol) that uses UDP rather than TCP, but I don't think it's really used. But as far as regular old FTP goes, they're right, it's all TCP.
Why not just use HTTP + TLS/SSL?
just wondering if it possible to get an ftp
package that recursively ftp's directories ?
ncftp does only 1 level down. i want to go
all the way similar to wsftp for doze95.
srp 's pretty neat... does a zero knowledge proof for password and then usually a cast cypher for protecting the session..
srp.stanford.edu/srp
I'd recommend using something like scp (or any other secure protocol designed for copying files) instead. You'll need a special tool on the client-end anyways, and there is no reason to use actual FTP. If you still wanna use FTP, use something like SWAN with it.
MIT IS is working on a kerberized FTP. Don't know how mature it is, though.
-pmitros
Why not just encrypt the files and use regular ftp?
Because your password would still be passed in the clear.
Uh... it doesn't matter whether the ftp password is passed in the clear or not. You can transfer files securely as long as the files are encrypted.
Here's what to do:
0. Make sure the remote host is running sshd and ftpd.
1. Before you connect to the remote host, configure your W98 SSH Client so that it forwards some _local_ port (e.g. 2121 or just 21 if you are not running an ftp server locally) to the FTP port (normally 21) of the remote host.
2. Connect to the remote host using ssh.
3. Using your ftp client, connect to the "localhost" port 2121 (or what ever port you chose in step 1).
That's it.
Using the same method you can have secure IMAP, POP or what ever connections.
That would be an elegant option, the downside is that no free IPSec implementation for win* exists. (I need to give access to some windows users) as far as I know. If you know one, or know a free VPN for win*, let me know.
Even better--use "rsync -e ssh", which gives security (via ssh) and also can greatly cut down bandwidth used.
Similar to ssltunnel is delegate
http://www.delegate.org
Works for Unix and Windows.
I use ssh with sftp wherever available. Then I have some windoze machines around which have SecureCRT, a terminal program with SSH support. I haven't found an "scp" functionality from it, however zmodem through it works great. You just type "sz filename" on the host side and download commences automatically. Uploading files is equally easy, just select upload from the transfer menu and select the files, it will even send the "rz" command out for you.
anonymous because posting from client site...
Forwarding just port 21 won't work, because the data is actually sent over port 20, right?
Using cryptographic products without a crytographic education is risky. For example, ssh is vulnerable to man-in-the-middle attacks. I looked through a lot of ssh documentation a while back, and it didn't even mention that deficiency.
Just use scp (secure copy), which is included with ssh.
mc has been able to do this for a while just type cd ftp://[username]@host and it will allow the same operations as a normal fs and also preserves the file attributes. Or use the tar feature of wu-ftpd ie get dir.tar
Have a look at:
SSL tunnel:
http://mike.daewoo.com.pl/computer/stunnel/
You can use SSH to encrypt the control connection (i.e. secure your passwords), but it is a pain to also encrypt the data.
If you want everything to be safely encrypted, your choices are:
(1) Use scp (part of ssh) to do the transfers. Works like rcp, can also copy over whole directories recursively.
There are also free versions of scp out there for win and mac.
(2) Use a SSL-ified FTP server and program. (check www.ssleay.org for a link).
Problem: I don't know of any SSL FTP programs out there for win or mac
How about running IPsec between the two boxes.
If they are both Linux, then look at:
http://www.flora.org/freeswan/
Not only will your FTP be encrypted, but so will
your Telnet, HTTP, and even your pings. The good
thing about this would be that you don't need any
special client or server applications.
Look in ftp.uni-mainz.de:/pub/int ernet/security/ssl/SSLapps/ for some SSL-aware telnet/ftp clients and servers.
You can use an industry standard encryption and authentication protocol with FTP supported by various clients.
First, go to http://www.openssl.org/. OpenSSL is based on SSLeay and is the basis for open source SSL communications in unix. You'll want to grab openssl and compile it and install it. It provides a number of useful programs including md5 & sha for generating checksums on files and a whole suite of other cipher routines.
Next visit http://www.psy.uq.oz.au/~ftp/Crypto/ and go find an FTP server and client pair which have SSL support. There are also a few general proxy deals which can handle it with any standard FTP server.
Now there are a few ways to do authentication, you can do normal authentication or authentication based on certificate which requires a CA server (things like verisign will work if you want to shell out some cash, but you can also build your own CA).
The great thing about SSL is it can autodetect encryption support. So you can take a standard telnet server, make a few minor modifications to get it SSL capable and connect to it using SSL capable telnet client or a vanilla telnet client and it'll use the strongest security possible.
No need for silly third party daemons or special ports. Although the official TLS service ports are different from their unencrypted couterparts.
This is good if you are behind a corporate lan which doesn't like allowing anything besides telnet, ftp, and web traffic through their proxy.
--
The world is neither black nor white nor good nor evil, only many shades of CowboyNeal.
Actually ssh2 already has an sftp.....
SSH2 comes with sftp, however, it seems to have been drinking your mountain dew, because it never seems to work too well (eg at all). However, if you want to do some fairly simple encrypted tunnelling, you can run a ppp connection over an ssh connection, and tunnel the network.
Posted by alanut:
Should be easy to make an app in java 2 using the JCE and streams. What type of encryption do you want?
It (tftp) is used for netbooting. Diskless systems often download their kernel via tftp.
Zero security.
As far as this topic goes, I echo: sftp, ssh, stunnel
I'm pretty sure that MIT's athena distribution provides a modified version of FTP which has kerberos support. This allows for secure authentication, but I'm not sure if the anything else is encrypted. If authentication is all that you need to be secure you might want to check it out. Kerberos can be a pain to get working, but once it is working it's really nice (i.e., you enter a password once and all your kerberos enabled programs never bug you for a password).
Ssh port forwarding would probably also work, but everybody else has already suggested that so I figured I'd throw out a different option.
-----
Free P2P Backup, Windows & Linux
The FAQ states that you use ssh to encrypt the control port and because of that, only the control information is encrypted, not the data portion. It's been my experience that if you use passive mode, both control and data go across the same port. Since they use the same port, control -and- data are protected.
Am I wrong here?
I don't believe there is a free implementation, but the specs are there, so anyone can have a stab at it (hope they do). There are several commercial implementations of the client.
--
I found that secureCRT (which supports both ssh and telnet) it very nice for windows. As for mac I haven't found anything. There is also a free ssh client for windows that is just called ssh client for windows. Don't have much on that one, it hs some copy paste termial emulation probs.
What do you despise? By this are you truly known.
I would like to expand on this question.
F-Secure SSH supports port forwarding but I haven't quite figured out how to forward my FTP connections through the F-Secure SSH to my WS_FTP client. Is this possible? If so, is there a HOW-TO anywhere?
Thanks in advance!
Eugenehttp://eugeneciurana.com | http://ciurana.eu
no body just a subject............... I rule BTW And don't spam me.... also one last tidbit while I'm here.. look into scp... though it's not a deamon per say it sedurely transfers files in the strongest of methods
Secure shell can tunnel anything, including FTP connections. You could probably even throw together a wrapper script called sftp or something. It just means that the server has to have secure shell as well as ftp.
Alternately, skip ftp entirely as an inherently insecure method.
ssh's own scp is a thing of beauty.
Beware of how scp2 and scp1 interact (or don't, rather), though.
~gr
Do you have a
Not if it was Canadian Mountain Dew.
yeah, i have. i really like it. both the telnet and ftp daemons work well in encrypted mode, and more importantly they handle unencrypted sessions perfectly, too. clients exist for most platforms, keysize can be huge (i use 1024 bit keys, myself), and it's transparent to the user (unlike ssh), so you don't have to "retask" them.
http://srp.stanford.edu/
enjoy, it works well!
jose nazario jose@biocserver.cwru.edu
I am using TeraTerm ssh to connect to linux machines and I have found that zmodem is the easiest way to transfer files. Nothing special to set up - it just works.
The major disadvantage is that it ties up your interactive connection.
Stop worrying about the risks of nuclear power and start worrying about the risks of not using nuclear power.
Look up stunnel (secure tunnels) on freshmeat. Unix and Windows clients that i know of, at least. It will secure *every* communication between the two machines.
Dump the IRS - http://www.fairtax.org
Right...I have seen Kerberos FTP at CMU ...It exists for BOTH Unix and Dos (not seen a Win version..but it must exist...and who cares ? ) .. that is)
Definitely lot less trouble than ssh (if kerberos is up
CIPE - encrypted IP over UDP tunneling
"This is an ongoing project to build encrypting IP routers. The protocol used is as lightweight as possible. It is designed for passing encrypted packets between prearranged routers in the form of UDP packets. This is not as flexible as IPSEC but it is enough for the original intended purpose: securely connecting subnets over an insecure transit network. The implementations mentioned below are actually in use in such an application."
The newest version of CIPE is available on
http://sites.inka.de/~bigred/devel/cip e.html
or ftp://sites.inka.de/sites/bigred/devel/cipe.html
It also works well for getting around those pesky universtity firewalls.
umm, ncftp goes as far down as you want.. might want to get the latest version..
BUT, ncftp uses the ls -R (i think) command to retrieve the directory listing. That is, it gets the list of the entire tree, then downloads it all. WSFTP gets it one dir at a time, and can work on pretty much any ftp, unlike ncftp. NCFTP also can't handle any kind of ftp servers that return unusual stuff in the directory listings..
- Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.
If security is a big concern, and your ftp site is really only for a select group of people, you may wish to consider the sendfile suite of utilities based on the SAFT (?) protocol. Basically, it's akin to email or instant messaging systems but with files and with decent security involved (you can filter out spurious senders of files, no passwords need pass over the 'net).
Something to give a shot for those of you wanting to give your friend, who's too lazy/paranoid/poor to set up an ftp server, a file.
I'll second that...I've had no problems with it, aside from a slightly cumbersome interface. Aside from NiftyTelnet, are there any other Mac clients? I've done extensive searching and can't seem to come up with anything else.
-- Deputy Dan will find us no matter how far away we go.
For Mac I use Nifty Telnet SSH. It's cost free and works well.
Why not use scp, which is included in the ssh-package and features encryption through the ssh-tunnel, transparant compression and authentication all in one?
The Secure Remote Password protocol (SRP) provides a supposedly secure login session as well as an encrypted channel if you wish. The web site is well documented. Has anybody used this in the Real World ?
gdon
As coincidence would have it, I just noticed something called bnc4all on freshmeat. It's a bouncer rather than tunneling or using an encrypted alternative. If you want to increase security while still allowing plain old ftp clients to connect, it may be an option. I have no experience with it, and no idea of its utility.
On the other hand, ssh/scp rocks. First choice if you can do it.
You could stick SSH in front of it. Then you could have an encrypted channel, and no clear-text passwords etc. SSH has clients for just about every platform.
Last time I installed ssh2, I think it came with a client/server package called sftp. Or maybe someone dropped crack in my mountain dew. You should be able to tunnel it through ssh if not.
If you download MIT Kerberos 5, it includes GSSFTP which is a Kerberized FTP service. Unless you have a Kerberos infrastructure at your location, however, this may be an excessively complicated solution for you.
The only difference between "normal" FTP
and "passive" mode FTP is that in passive
mode, the client opens the data connection
to the server, instead of vise-versa.
The data connection is still a separate
stream, and happens between random ports.
Passive is good for things like NAT firewalls,
though, because it allows all connections to
remain outbound instead of requiring an
inbound connection. But it will still bypass
your port forwarding.
http://www.uni-karlsruhe.de/~ig25/ssh-faq/
As it points out, this will leave the data connection open to sniffing/hijacking. If you only care about the integrity of the files you transfer, then verifying against (securely obtained) md5 checksums should do the trick. If you want to encrypt the datastream, you'll need to be a bit more fancy.
If it's possible, consider the use of 'scp' instead of ftp; you'll get protection of both control and data, since it's built into ssh.
Another option (if you control the clients as well) is to use ssh2's "sftp" client. Beware the licensing issues with ssh2, however.
If you really trust the clients, it's also quite easy to set up a VPN between the client and server, and then FTP directly. The ways to go about this depend on the OS you're using, so I'll leave it as an exercise to the reader.
Use ssh's port forwarding, combined with ftp's passive mode. man ssh.