automate ssh login

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Thu Jan 22 16:32:15 UTC 2004


On Thu, Jan 22, 2004 at 07:44:51AM -0800, James wrote:
> hello,
> 
> 
> I need to write a perl script to automate a ssh login. the script is run by system user 'lp' which
> doesn't have a home directory. 
> 
> i was using Net::SSH::Perl but the implementation is too slow in my case. so i thought i would opt
> for ssh Key authtication.  since 'lp' doesn't have a home dir, i have to go all the way trouble to
> do login from a user who has a home dir, then use the  generated .ssh dir for the 'lp' user. it's
> a pain to set it up but it works. 
> 
> but this script will be used for other department too and log in to different server. i am
> wondering if there is a way as easy as to provide user name and password from the ssh command line
> ?  or, works better and easiser set up in my case ?

An explanation of why you even need to do this hack might be good, since
there may be much better solutions around than what you are trying to
do.

If there is concern about encrypting data transfers between systems for
printing, perhaps cupsys with SSL would make sense.  It is far superior
to lpd/lpr/etc anyhow, and even works for windows 2000 and XP directly.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list