with more detail --- Re:automate ssh login

James shijialee-/E1597aS9LQAvxtiuMwx3w at public.gmane.org
Thu Jan 22 16:52:25 UTC 2004


--- Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> 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.

okay here is bit rundown of what i am doing.

this script is invoked by the print quota management script which interface with LPRng.

user's print job is forwarded from samba server to the print server where the quota being checked
and error being reported to user.  the error is sent by login to the samba server and send the
windows popup message to the user. 

the script i am in question does the login samba server and run smbclient command to send popup
msg.
 
> 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.

that's not a concern. 

Qiang.


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
--
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