Operating System - HP-UX
1752794 Members
5991 Online
108789 Solutions
New Discussion юеВ

Re: SCP --- Without promting for Password

 
Vidhya B
Frequent Advisor

SCP --- Without promting for Password

Hi all,

I need to do scp among our servers without prompting for password only from a particular user. I have heard that keys of that server has to be updated in the authorized_keys file. I found two keys in my servers rsa and dsa. Which key am I supposed to share?

I tried giving rsa key of one server in the authorized_keys of the other server. But I was again promped for password. I tried the same with the dsa key also.

Am I supposed to do anything after changing the authorized_keys file? Else is there anything else I have to do?

Kindly help me with this. Thanks in Advance!!!
32 REPLIES 32
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

A Forum search for keywords like, say,
password ssh
or
passwordless ssh
should find many old threads which cover this
topic (many times).

> [...] our servers [...]

Not a very detailed description of anything.

uname -a
ssh -V

> I found two keys in my servers rsa and dsa.

Where? As usual, showing actual commands
with their actual output can be more helpful
than vague descriptions or interpretations.

> I tried giving rsa key of one server in the
> authorized_keys of the other server.

See the previous comment.
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi all,

The dsa and rsa keys are found in the .ssh directory of the user's home directory.

server:root-/home/glance/.ssh>ll
-rw------- 1 glance users 604 Mar 24 11:14 authorized_keys
-rw------- 1 glance users 668 Apr 28 2010 id_dsa
-rw------- 1 glance users 604 Apr 28 2010 id_dsa.pub
-rw------- 1 glance users 1675 May 5 2010 id_rsa
-rw------- 1 glance users 396 May 5 2010 id_rsa.pub
-rw-r--r-- 1 glance users 34476 Mar 24 04:06 known_hosts
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

Here is the output of ssh -V

root-/>ssh -V
OpenSSH_5.3p1+sftpfilecontrol-v1.3-hpn13v5, OpenSSL 0.9.8l 5 Nov 2009
HP-UX Secure Shell-A.05.30.008, HP-UX Secure Shell version


We have servers of all the three version 11iv1,v2 and v3.

Please help on this.
Sentinel_2
Advisor

Re: SCP --- Without promting for Password

Make sure .ssh directory has 700 permissions.

Regards
Steven Schweda
Honored Contributor

Re: SCP --- Without promting for Password

> A Forum search for keywords like, say,
> [...]

Did you look?

Did you see all the requests for the output
when you add "-v" (or "-vv", or "-vvv") to
your ssh or scp command?

Did you see all the suggestions to look at
the system log file on the server?
Mel Burslan
Honored Contributor

Re: SCP --- Without promting for Password

copy id_rsa.pub to the remote server

on remote server

USER=username-here
cat id_rsa.pub >> ~${USER}/.ssh/authorized_keys

chmod 700 ~${USER}/.ssh
chmod 600 ~${USER}/.ssh/authorized_keys

and this is pretty much it. If after doing this, you are still getting prompted for password, run this command from local system:

ssh -vvv -l username remote-servername

and post the output here.

Hope this helps
________________________________
UNIX because I majored in cryptology...
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi,

I have shared the id_rsa.pub of both the servers. But the commmunication is unidirectional.

Please find the Attachment for ssh -vvv -l username remote-servername.

Please help with the issue.

Thanks In Advance !!!
Jitesh purohit_1
Regular Advisor

Re: SCP --- Without promting for Password

Hi Vidya ,

What's OS version of your source & Destination server ,

Are you trying to connect to a Wintel / Unix file server ?

=============
debug2: ssh_connect: needpriv 0
debug1: Connecting to filesvr [Remote Server IP] port 22.
==============

Thanks
Jitesh
Vidhya B
Frequent Advisor

Re: SCP --- Without promting for Password

Hi all,

Please find the uname -a output below.

Source:/>uname -a
HP-UX bkpsvr B.11.23 U ia64 2564450715 unlimited-user license

Destination:/>uname -a
HP-UX filesvr B.11.23 U 9000/800 77929270 unlimited-user license


Please help me with this.