Forum Discussion
Josh_Hildebran1
Nimbostratus
Jul 21, 2008Monitor for SFTP
Does anyone have a sample external monitor for monitoring nodes that are running an SFTP (via ssh) server?
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
- 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/null
Arguments 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.192
Batch file
is nothing more than:sftpmonitor.input
dir bye
SFTP 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).
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects