Page 1 of 1

SFTP Connection

Posted: Thu May 08, 2014 1:59 pm
by JCheever
I have downloaded and installed a SFTP plugin which checks SFTP connections. The plugin requires the information: host, port, user, password, and filepath to be entered into the Perl Script.

The password provided I was provided has a "#" within it. Since i need to enter the required information within the Perl Script, will this password work? If so, how do I enter this password so that the "#" is detected as part of the password.

Re: SFTP Connection

Posted: Thu May 08, 2014 2:06 pm
by slansing
Please attach the plugin here, along with the output when you run that plugin with the password you mentioned, you can sanitize the password, but show us the output it gives you, and the full command you ran.

Re: SFTP Connection

Posted: Thu May 08, 2014 3:52 pm
by JCheever
The plugin is: http://exchange.nagios.org/directory/Pl ... st/details

I am unable to get the plugin to run from my server as the error "No such file or directory" is received when running ./sftp.pl ...

Re: SFTP Connection

Posted: Thu May 08, 2014 4:00 pm
by tmcdonald
Are you running that from the directory in which the plugin is located?

Re: SFTP Connection

Posted: Thu May 08, 2014 7:56 pm
by Box293
JCheever wrote:how do I enter this password so that the "#" is detected as part of the password.
Try enclosing the password in "double quotes".

Code: Select all

"#Str0ng P@ssw0rd"

Re: SFTP Connection

Posted: Fri May 09, 2014 11:30 am
by JCheever
I am running the plugin from /usr/local/nagios/libexec

Re: SFTP Connection

Posted: Fri May 09, 2014 1:04 pm
by tmcdonald
Can you post a screenshot of your terminal session? I want to see the actual output of the following:

Code: Select all

pwd
ls /usr/local/nagios/libexec/sftp.pl
/usr/local/nagios/libexec/sftp.pl
Bear in mind you will also need some perl modules installed to run the plugin, specifically:

XML::Simple;
Net::SFTP::Foreign;
Net::SSH2;
File::Basename;