Operating System - HP-UX
1834453 Members
1864 Online
110067 Solutions
New Discussion

Re: SCP --- Without promting for Password

 
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi Madhuchakkaravarthy,

I couldn't follow.

Consider that I should do scp from server1 to server2. I have generated keys in both the server. I have shared the id_rsa.pub key of server1 to the authorized_file of server2 and vice versa.

Now what should I do exactly? Which id_rsa.pub file should be renamed.

Kindly help.
madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

CONSIDER TWOS SERVER NAME vaigai and kaveri.

username is godavari.


in vaigai server.

cd /home/godavari/.ssh
ssh-keygen -t rsa
type enter for all.

rcp the id.rsa.pub key to kaveri in home dir of godavari under .ssh.

in kaveri server
do cat id.rsa.pub >> authorized_keys
rm id.rsa.pub key.

generate ssh keys here.

rcp the public key to vaigai server.

before doing rcp,change the name of id.rsa.pub key in vaigai server to id.rsa.pub.VAIGAI. since alredy public key for vaigai is present,and if so u have done rcp it may overwrite the file.

after appending the kaveri public key in authorized_keys,remove the id.rsa.pub key and move the id.rsa.pub.vaigai to id.rsa.pub

then do

su - godavari

ssh ipadress

check the permission and ownership.

regards

MC

Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

I tried. Still facing issue :(

Its doing scp only in one direction without password. Is there anything else I have to consider?

Else is there any other method to transfer files without prompting for password.

Please find the ssh -vvv

Kindly help.
madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

if its urgent issue add the hosts entry in .rhosts file and do rcp

regards

MC
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

What should be done for .rhosts entry?

Is there any problem if I use that?

madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

hi

touch the file .rhosts and add entry in home dir in both servers.

but doing this is a security violation.

regards

MC
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

Ok I am not aware of that.

I don't want to do it. That might put me in trouble. Is there anything else I have to do other than the steps I have done for scp before.

Is there anything I should do in sshd_config file?
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

> [...] As usual, showing actual commands
> with their actual output can be more helpful
> than vague descriptions or interpretations.

Which part of that was unclear?

> Then I shared this key to the other server.

Which file (or files) did you "share"? What,
exactly, does "share" mean to you? For
example, what do these commands show on the
two systems?:

ls -ld .ssh
ls -lR .ssh

_Those_ are actual commands. "I shared this
key to the other server" is noise, which
conveys no useful information.

> I checked the logs also.

Which "the logs" would those be? What,
exactly, did you "check", where?

> debug1: Next authentication method: keyboard-interactive

The server is rejecting your key data. I do
not know why. The server knows why. I'll
try this one last time:

LOOK AT THE SYSTEM LOG FILE ON THE SERVER
TO SEE WHAT IT DIDN'T LIKE.