Operating System - HP-UX
1752795 Members
5914 Online
108789 Solutions
New Discussion юеВ

Re: SCP --- Without promting for Password

 
Muller, W.D.
Occasional Advisor

Re: SCP --- Without promting for Password

Hi,

Once and a while I have to configure new servers with the same issue.

Please follow the steps mentioned in the next url exactly, and all your wishes will come true:-)

http://waelchatila.com/2005/06/06/1118124232757.html

Do not forget the "chmod 700" part!

bye

Waldemar
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

I read the url and I tried the steps given in it. Even then its not working.

Please help me with this.
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

> [...]
> debug1: Offering public key: /home/glance/.ssh/id_rsa
> [...]
> debug1: Offering public key: /home/glance/.ssh/id_dsa
> [...]
> debug1: Next authentication method: keyboard-interactive

The server did not like your key data.

> Did you see all the suggestions to look at
> the system log file on the server?

Well, did you?

The server probably knows why it was unhappy,
but it doesn't always tell the client. You
may need to look at the system log file on
the server to see what it didn't like.
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

I am facing this issue now only.
Before we had scp communication unidirectionally from server1 to server2 without password. I wanted to make this communication bidirectional. So I have shared the id_rsa.pub key.

Now Server2 is able to scp without password to server1. But the server1 is not able to scp without password.

Please help me with this.
Mel Burslan
Honored Contributor

Re: SCP --- Without promting for Password

Okay, when you say, you shared the public keys, I am assuming you you used the same public key. Is that right ? If so, make sure you have the corresponding private key id_rsa or id_dsa depending on which one you are using, be available on both servers, in ~$USERNAME/.ssh

Public key sharing alone does not make much sense unless you have the private part of of the key.

On server2, find the id_rsa file under the user's .ssh directory and copy it to the server1 and put it the same place you picked it up on server2.

This should get you going.
________________________________
UNIX because I majored in cryptology...
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

> Okay, when you say, you shared the public
> keys, I am assuming [...]

"I am assuming" means that he doesn't know
what you did. I don't know what you did. We
don't know what you did, because you didn't
tell us what you did.

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

Still true.

We also can't see your key files, or any of
the file or directory permissions or
ownership.

> [...] 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.

> Please help me with this.

You first.
madhuchakkaravarthy
Trusted Contributor

Re: SCP --- Without promting for Password

hi vidhya

follow the steps...

in node A:

in home dir of user A

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

rcp the id.rsa.pub key to node B in home dir of user B.

cd /home/userB/.ssh
cat id.rsa.pub >authorized_keys.
then rm the id.rsa.pub key.

ssh-keygen -t rsa
type enter for all.

rcp the id.rsa.pub key to node A in home dir of user A.(before rcp,rename the public key id.rsa.pub to nodeA.id.rsa.pub)
then do rcp.
cat id.rsa.pub >authorized_keys
now again rename the nodeA.id.rsa.pub to id.rsa.pub


then do ssh ipaddress of node A from Node B and vice- versa

then after u can do scp or sftp.

regards

MC



Abid Iqbal
Regular Advisor

Re: SCP --- Without promting for Password

Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

Thankyou for all your replies.

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

I have generated ssh key. I have shared the id_rsa.pub key of one server to another server's authorized_keys file which is found in the .ssh directory of user's home directory.

Actually since I am trying to do scp bi-directionally without password, I have done the same sort of sharing in the other server also.

Even then I am prompted for password. I can do scp without password only unidirectionally. I am not able to do it bi-directionally.

Is there anything else I need to do?
Kindly help.
Mel Burslan
Honored Contributor

Re: SCP --- Without promting for Password

Are you doing this as root ? Because, there is a provision specific to root login via ssh connections in the sshd_config file.

Otherwise, I would vote on ownership and permissions of .ssh (700) directory and authorized_keys (600) file. Make sure they are owned by the username which is using/storing these files. And permissions are as such indicated in parentheses above.

In the direction it is asking you for a password, run this command and post the whole output here:

ssh -vvv remote_server_name

________________________________
UNIX because I majored in cryptology...