1847872 Members
3342 Online
104021 Solutions
New Discussion

Re: Secure copy.

 
Mathais Kashiri
Occasional Contributor

Secure copy.

I am having problems getting secure copy to work without prompting for a password. I have changed the necessary entries in $HOME/.rhosts and /etc/hosts.equiv; but this has not resolved the problem. Any assistance appreciated.
4 REPLIES 4
Mathais Kashiri
Occasional Contributor

Re: Secure copy.

In assistance, there is a generic user on the boxes involved
Rainer_1
Honored Contributor

Re: Secure copy.

check on both hosts with nslookup if you get equal response and check .rhosts if it contains this hostname
Mathais Kashiri
Occasional Contributor

Re: Secure copy.

Thanks for the reply Rainer. The .rhosts file does contain the required details; is there anything specific to scp that I need to change in the sshd2_config file.

Thanks
Ralph Grothe
Honored Contributor

Re: Secure copy.

Hi Mathais,

(is this a typo or correctly spelled?)

I'm not sure if you mean the scp command of the secure shell (ssh) when talking about secure copy.
If scp is meant then there are several ways to prevent scp from prompting you for a password.

1. use the ssh-keygen command

This will create a pair of private and public keys for your (client) host.
The public key will be appended to the file
${HOME}/.ssh/identity.pub
and the private key to
${HOME}/.ssh/identity
Remember that the identity file with the private key must be readable only to the account the key was created for.
When asked for passphrase just hit (i.e. blank passphrase)
After the key pair has been generated you may distribute the public key to all the hosts where you want to be granted automatic login.
This is done by appending it to the remote accounts' ${HOME}/.ssh/authorized_keys.
You can either distribute the public key using scp or if you want to be extra cautiously by carrying it on an extra medium (e.g floppy).
Afterwards you should be able to login without being prompted.

2. add account host pair in .shosts files of home dirs on remote hosts.
These files also have to be read only by their owners.

3. same as .shosts but use /etc/hosts.equiv

Just a word of caution.
You shouldn't do this with the root account as this may compromise your security.

But consult manpages for details.


Madness, thy name is system administration