Re: Can expect do this?

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



Hi,

On Tue, Nov 11, 2008 at 04:42, Fajar Priyanto <fajarpri@xxxxxxxxxx> wrote:
> But, I'm in an environment where PubKeyAuthentication is not allowed in ssh :(
> So, I'm confused how to automate it as cronjob.

Before you start, consider enabling public keys or requesting that to
your sysadmin, since using them is much more secure than storing your
passwords in text scripts.

> However, I read somewhere that we can write a little bash script that
> will utilize 'expect' to answer for the ssh password prompt?
> Can we do this?

Yes.

> Any examples are great help.

Google is your friend.
http://bash.cyberciti.biz/security/expect-ssh-login-script/

(DISCLAIMER: I haven't tested the script above. Google it yourself if
you want to see others.)

HTH,
Filipe
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux