Re: FTP and security

From: Date: Tue, 26 Nov 2002 20:34:01 +0000
Subject: Re: FTP and security
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126173@lists.php.net to get a copy of this message
Well, as far as I know you need to have sshd (or an equivalent) running on the receiving end. Then, on your server you call up a command like so: ssh -f -2 -N -L {source-port}:{end-address}:{end-port} {sshd-server-address} -l {login} This command causes ssh to create a secure tunnel that goes from source-port on your server to end-address:end-port through the ssh server {sshd-server-address}. Clearly, {sshd-server-address} and {end-address} can be the same computer, but not necessarily--as long as there is a direct route between the two and you can consider that route secure. Once you've established the connection, you can connect to your local box on the {source-port}, and your data will be transparently (and securely) redirected to the new box. For example: ssh -N -2 -f -L 3307:my.mysql.box:3306 my.mysql.box -l mysql_user creates a secure tunnel for connecting to a remote MySQL server securely. After you've established the connection, you can use 127.0.0.1:3307 on your local box to connect to MySQL and your data will be transported securly to the other computer. Hope this helps... a more complete (and probably more accurate) explanation would take a long time, but if you look around on the Net you should find plenty of resources. Cheers, Marco -- ------------ php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Come visit us at http://www.phparch.com!

« previous php.general (#126173) next »