RE: SSH without inputing password




--- Gerrard Geldenhuis <Gerrard.Geldenhuis@xxxxxxxxxxxx> wrote:

You could use expect.
Here is an article on it...
http://www.linuxjournal.com/article/3065


first, thanks for all replies.
but, expect is also not what I wanted.
why? because expect can't let you stay in remote host for long time.

for example, you say something like this in an expect script:

spawn ssh username@xxxxxxxxxxx
expect -exact "username@xxxxxxxxxxx's passwd: "
send -- "password\r"

when you run the script, you do can login to the remote host
automatically.
But, you can't do anything.
Even you input an "enter", you will get exited automatically.
I don't know why, but this is the fact.

generally expect do some automatical tasks, but not keep a persistent ssh
connection.

This is what expect can do:

1> logins into a machine
2> executes a program
3> logs out of the machine

But what I wanted is:

1> ssh remote_host
2> input password automatically for me
3> let me login into it successfully and stay there

Do you know me? Thank you.

--Ken





Get the name you always wanted with the new y7mail email address.
www.yahoo7.com.au/y7mail


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list