automate ssh login
David Hill
davey-kGEj4qu2WI33fQ9qLvQP4Q at public.gmane.org
Fri Jan 23 06:12:10 UTC 2004
man ssh - will give you all the info you need ...
ssh-keygen - to make RSA. don't enter password
copy key to server and put in ~/.ssh/
edit authorized_keys
to run command on server run:
ssh root-br3q3gDaRRhcicmfGPyQcCwD8/FfD2ys at public.gmane.org halt
That should shutdown your computer at this.is.a.domain.ca
RSA/DSA keys are easy don't run away from them. It takes a total of 4
commands tops to setup RSA/DSA auth.
-davey
On Thu, 22 Jan 2004, James wrote:
>
> --- Taavi Burns <taavi-LbuTpDkqzNzXI80/IeQp7B2eb7JE58TQ at public.gmane.org> wrote:
> > On Thu, Jan 22, 2004 at 07:44:51AM -0800, James wrote:
> > > 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 ?
> >
> > When using ssh in a bunch of pipes, it will "do the right thing" and ask for authentication
> > from your terminal. There is no way to provide username and password as commandline
> > parameters, though, as they would be visible to anyone else on the system (via top or ps).
>
> that's what i know of. but hoping there is solution to it other than using the public
> authentication key. i may just off with two choice for this script, either use Net::SSH::perl or
> the authentication key. though, the first one is slow but easy to use. the second is pain to set
> it up.
>
> > What does the script actually do? Does it remotely execute a program? Does it copy
> > files?
>
> it logs in a remote machine and runs a command. this script run by 'lp'.
>
> let me know if you need more detail.
>
>
> 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
>
--
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