LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   scp still ask for root 's password when executing... (https://www.linuxquestions.org/questions/linux-general-1/scp-still-ask-for-root-s-password-when-executing-47869/)

Laplace 03-02-2003 07:35 AM

scp still ask for root 's password when executing...
 
scp still ask for root 's password when executing...
last june I have tested scp and have written down notes on scp implementation. When I do again next week I went into problem.


both machines are sitting side by side but eventually one of them has go some where at least 400 miles away.

watch my steps:

1. exchange and store /root/.ssh the rsa generated by ssh-keygen -t rsa
2. it generates the fingerprint but my note tell me to do nothing.( copy or paste somewhere)
3. enter no password when asked for password.

in the destiny server I have a script like this
/usr/bin/scp -o protocol=2 -C -c 3des -4 -v -r -P 22 -i /root/.ssh/authorized_keys4 root@192.168.0.199:/var/www/html/redhat7.3/somesorucedirecoty/*.* /home/mydestinybox/save/



my /etc/ssh/sshd_config in source linux redhat 7.3 server.



# $OpenBSD: sshd_config,v 1.48 2002/02/19 02:50:59 deraadt Exp $

# This is the sshd server system-wide configuration file. See sshd(8)
# for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

Port 22
Protocol 2,1
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 3600
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 600
#PermitRootLogin yes
#StrictModes yes

#RSAAuthentication yes
#PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

# rhosts authentication should not be used


RhostsAuthentication yes


# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts

RhostsRSAAuthentication yes

##### 1 st March 2003 no





# similar for protocol version 2

HostbasedAuthentication yes

# add this line 1 st March 2003
RSAAuthentication yes


# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no

# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
PermitEmptyPasswords no

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
# KerberosAuthentication automatically enabled if keyfile exists
#KerberosAuthentication yes
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# AFSTokenPassing automatically enabled if k_hasafs() is true
#AFSTokenPassing yes

# Kerberos TGT Passing only works with the AFS kaserver
#KerberosTgtPassing no

# Set this to 'yes' to enable PAM keyboard-interactive authentication
# Warning: enabling this may bypass the setting of 'PasswordAuthentication'
#PAMAuthenticationViaKbdInt yes

#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no

#MaxStartups 10
# no default banner path
#Banner /some/path
#VerifyReverseMapping no

# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server


I do not call from my notes that I need to do the some setting of the destiny server.

Would U please point out my error, I appreciated.

pjcp64 03-02-2003 08:45 AM

There is an excellent series of three articles written on the subject. As I understand it, to use a password free authentication you also have to use ssh-agent and then ssh-add. These articles can be found at:

http://www.gentoo.org/proj/en/keychain.xml

In section 4. they have the three links to each of the three articles.

Hope this helps.

Thom


All times are GMT -5. The time now is 05:59 PM.