[Summary] SSH from script without key

From: Xavier Mertens <xavier_at_rootshell.be>
Date: Mon Oct 23 2006 - 10:43:28 EDT
Hi *,

My question was:


Hi *,

My problem is the following: 
I need to open SSH sessions to remote hosts from scripts.
But I'm not allowed to install a key on the remote hosts. I must use a standard password authentication.

I found a Perl module (Net::SSH::Perl) which can perform this. Unfortunately, it requires the Math::Pari module (which does not compile properly on here)

Question: how could you automate SSH session from scripts 5shell or perl) with respect of performances and, of course, security?


Lot of mails (as usual ;-) and the best solution is to use Expect (http://expect.nist.gov/). In my case, I installed the Perl module (http://www.cpan.org/modules/by-module/Expect/). Everything can be done via simple perl script. 

The next step is the script security! It must have access to the remote account passwords. Lot of you noticed that a better method should be to work with keys but, is this specific case, I can't :(


UNIX is user friendly. It's just selective about who its friends are
sunmanagers mailing list
Received on Mon Oct 23 10:44:13 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:44:02 EST