Is there a way to automate FTP-SFTP conversion by replacing the ftp binary with a wrapper script that runs ssh-convert-ftp with the original ftp command.
asked Dec 27 '10 at 16:35
SSH KB ♦
SSH Tectia ConnectSecure with capture component installed
Connection Broker configuration (ssh-broker-config.xml) set up to convert FTP connections (see the user manual for configuration details).
On Unix, the ssh-convert-ftp command needs to be used to activate the FTP-SFTP conversion. For example, to start an FTP session to ftp.example.org with FTP-SFTP conversion enabled, you could run the following command: $ ssh-convert-ftp ftp ftp.example.org
To start a bash shell session with FTP-SFTP conversion enabled for all commands, you can run the following command: $ ssh-convert-ftp bash
One way to make the conversion activation automatic on Unix is to rename (or relocate) the ftp binary and use a wrapper script like the following in its place:
exec ssh-convert-ftp renamed-ftp "$@"
Now, when the old ftp command is run, this script will be run instead, and the FTP-SFTP conversion is automatically activated for the FTP session.
Please note that the client needs to have the server's public host key before the connection can succeed. The hostkey needs to be fetched for the IP address because the ssh-capture (and ssh-convert-ftp) uses IP addresses rather than hostnames.
answered Dec 27 '10 at 21:36