Operating System - HP-UX
1751710 Members
5032 Online
108781 Solutions
New Discussion юеВ

SCP --- Without promting for Password

 
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

> Is there anything else I need to do?

You might read some of the previous responses
here, and answer the questions in them, or
follow the suggestions in others. For
example:

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

> [...] look at
> the system log file on the server?

> [...] You
> may need to look at the system log file on
> the server to see what it didn't like.

> > [...] You
> > may need to look at the system log file on
> > the server to see what it didn't like.
>
> Still true. We can't see what's in there,
> either.


> I had already followed the steps [...]

This does not show me exactly what you did.

> I have generated [...]. I have shared [...]

This does not show me exactly what you did.


Have you considered looking for clues in the
server's system log file? It's only a
thought.


> Kindly help.

I've tried, but it seems to be hopeless.
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi Stephen,

>>I had already followed the steps provided in the doc by Abid Iqbal.

This is the document I mentioned.
http://www.linuxjournal.com/article/8600


Hi all,

I am not using root user for scp.
I have assigned permissions as stated by Mel Burslan. Still I am prompted for password.
I checked the logs also.

PFA for ssh -vvv output.

madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

hi

capture the screen logs that u have used for generating the ssh keys and send.

send the steps that u have used for generating the ssh.

regards

MC
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

These are the steps I followed.

ssh-keygen -t rsa
Generating public/private rsa key pair.

Enter file in which to save the key (/home/glance/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/glance/.ssh/id_rsa.
Your public key has been saved in /home/glance/.ssh/id_rsa.pub.
The key fingerprint is:
b7:84:cc:46:4e:02:12:72:56:0b:62:4e:5b:d4:f5:35 glance@vaigai


I have generated the ssh key using the above steps. Then I shared this key to the other server.

In the other server,
cat id_rsa.pub_vaigai>>/home/glance/.ssh/authorized_keys
madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

hi

every thing is fine.

after appending it to authorized keys remove the public key from that machine. and generate the ssh key for second machine and rcp to first machine .

before doing rcp to first machine mv the public key of first machine to mv id.rsa.pub to id.rsa.pub.first machine

then do rcp and append it to authorized_keys

after appending mv id.rsa.pub.first machine to id.rsa.pub

home dir permission 755 .ssh -- 700 authorized_keys --- 600

regards

MC
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?