Re: Passing password in ssh

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 22, 2008 at 01:41:46PM +0000, tony.chamberlain@xxxxxxxxx wrote:
> 
>    Any way to pass a password (on command line) in SSH?
>    Sure you can use the ssh-keygen and set up public and
>    private keys and all that.  Problem is, in batch mode
>    something can go wrong.  You might not have the entry
>    in the hosts file, or something.  And then your batch program
>    will freeze waiting for a password or human response to type
>    "yes".  It would be good to do like ssh -l login -p password blah blah
>    blah,
>    but I can't figure out how.
>    A second question (acutally alternative).  Any other way to do this:
>         ssh -l login host cmd
>    That is, execute a command on a remote host, other than ssh?
>    Might be an alternative.

> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Try expect for this.
With expect you are able to catch events of your session and acting accordingly.
I use expect to change passwords remotely.

Cheers,
ku

-- 
https://www.xing.com/hp/HansDieter_Kutz/
http://www.hdkutz.de
Luke Skywalker:
	If I don't make it back, you're the only hope for
	the Alliance.
Princess Leia:
	Luke, don't talk that way. You have a power I
	don't understand and could never have.
Luke Skywalker:
	You're wrong, Leia. You have that power too. In
	time you'll learn to use it as I have. The Force
	runs strong in my family. My father has it. I have
	it. And... my sister has it. Yes. It's you, Leia.
Princess Leia:
	I know. Somehow, I've always known.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux