Heinz Wittenbecher wrote:
> Thanks Charles (and others)
> That's what I ended up spending my Sunday night on :-)
>
> Got scp working but have not been able to suppress the requirement for a
> password at each scp.
>
> As I'm planning to run scp periodically unattended, I need to do it without
> user input. I've tried some different settings in sshd_conf on the
> 'receiving' RH7 server, but havn't hit on the right one yet.
>
> If anyone has a scripted scp session and is willing to share, I'd sure
> appreciated it.
> Or simply a sample configuration.
>
Heinz one way to accomplish this is to use RSAAuthentication with an empty
passphrase:
As the user that will be initiating the connection on the box it willbe
initiating from type
ssh-keygen
and just hit enter when prompted for the passphrase.
Then copy the identity.pub file from that machine and append it to the
/home/username/,ssh/authorized_keys file on the remote box where user name is
the user that will be on the remote machine.
then you can run scp as the user like
scp /files/to/be/transfered remoteuser@remotehost:/remote/directory
On the remote box make sure that /etc/sshd/sshd_config has
RSAAuthentication yes
and if youwant to disallow password only authentication:
PasswordAuthentication no
I also make I have set:
PermitRootLogin no
to give me an additional warm and fuzzy
Or I guess you could use expect to script the login process using a password,
but i believe that this is more secure since no amount of bruteforce password
checking will accomplish a login
you can run the script as root (from cron for instance) by specifying the
identity file to use (not the pub one but the ~/.ssh/indentity file that matched
the identity.pub file you placed in the remote authorized_keys file
HTH
Bret
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list