Forum Discussion
Monitor for SFTP
A default "tcp" monitor on port 22 seems to kill the FTP server to the point where my FTP monitor on 21 stops functioning.. well, the monitor probably functions, but the server dies for a little while. I'm taking that up with the vendor (serv-u)..
But in the meantime, I'd like to have a real SFTP monitor that logs in and grabs a file. Preferably one that uses password authentication, not private key.
Thanks in advance!
-Kyoo
3 Replies
- Josh_Hildebran1
Nimbostratus
Has anyone successfully installed "lftp" on an LTM BigIP box? passing passwords on the command line to lftp is simple, and it handles SFTP and FTPS. - FMA_199355
Nimbostratus
Hey guys,
I followed hoolio's approach (thanks for you idea) to build a tiny monitor and this seems to be working fine for me.
Here is the string which is executed within external monitor:
sftp -o PubkeyAuthentication=yes -o IdentityFile=/root/.ssh/${PKEY} -b /home/${BFILE} ${USER}@${HOST} | grep ${MATCH} 2>&1 > /dev/nullArguments here:
`PKEY` - private key file name for SFTP authentication `BFILE` - batch file specifing which commands to execute after login `HOST` - ip address of SFTP server `DEBUG` - 0/1 = on/off `MATCH` - a string we are looking for to check health `USER` - account to access SFTP `In CLI it looks like:
sftp -o PubkeyAuthentication=yes -o IdentityFile=/root/.ssh/sftpmonitor_rsa -b /home/sftpmonitor.input f5_monitor@10.128.192.192Batch file
is nothing more than:sftpmonitor.inputdir byeSFTP administrator created a file named
which monitor is looking for. If it gets this string with grep, then we are marking pool member up. Otherwise it is red.f5_health - b_kodan_313047
Nimbostratus
Hi FMA,
How do you manage the public key authenticatiion?
"PubkeyAuthentication=yes -o IdentityFile=/root/.ssh/sftpmonitor_rsa". I assume sftpmonitor_rsa is the private key and is stored in server(/root/.ssh/sftpmonitor_rsa).
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com