If SSH without passwords is what your after why not use key based
authentication? Setting up keys is painfully simple.
Public key encryption
Generating keys for server A (the one with the data to be synced)
a...@a:~> ssh-keygen -t rsa
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a...@a
Tell Server B to Accept the key
1. Create a directory ~/.ssh as user b on B
a...@a:~> ssh b...@b mkdir -p .ssh
b...@b's password::
2. Append a's new public key to b...@b:.ssh/authorized_keys
a...@a:~> cat .ssh/id_rsa.pub | ssh b...@b 'cat >> .ssh/authorized_keys'
b...@b's password::
3. Change permissions for b's authorized_keys file
a...@a:~> ssh b...@b chmod 0600 .ssh/authorized_keys
b...@b's password::
Done
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Friday, March 20, 2009 5:30 PM
To: Main PLUG discussion list
Subject: Re: To have a program to "type" a username/passwordfor me. How?
Ah well...
So much for skipping the research:
http://bash.cyberciti.biz/security/expect-ssh-login-script/
Darn it...
ET
[email protected] writes:
> To have a program to "type" a password for me. How?
> Hello widespread wisdom...
>
> I want to propagate public keys to several dozens of puters so I can
> login passwordless.
>
> I am not looking forward to typing (or cut'n pasting) a password a
> gazillion times. They all have the same username/password combination.
>
> I know that expect can be used to "type" a password (or to fool passwd
> to change a password without manual intervention), but I don't know how.
>
> What I want is ti fire a loop to copy my keys to all the machines and
> to have the program to "type" the username and the password to free me
> up from the dull stuff.
>
> This *HAS* to be possible, does anybody know how?
> Thanks! :)
> ET
>
> PS: No, I haven't researched this, this question is the beginning of
> my research...
> ---------------------------------------------------
> PLUG-discuss mailing list - [email protected]
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss