So I'm trying to set up SSH so that the server doesn't prompt for a password on my freeBSD box.
I want to use it to update my secondary DNS server,
also other files that I need to transfer almost daily.
I did exactly as these websites told me to do.
http://www.jdmz.net/ssh/#note2
http://chinese-watercolor.com/LRP/printsrv/keygen.html
Of course using my own configurations...
However, STILL the server asks for the password.
This is my /etc/ssh/sshd_config file
# $OpenBSD: sshd_config,v 1.68 2003/12/29 16:39:50 millert Exp $
# $FreeBSD: src/crypto/openssh/sshd_config,v 1.40 2004/04/20 09:37:29 des
# This is the sshd server system-wide configuration file. See
# sshd_config(5) 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.
# Note that some of FreeBSD's defaults differ from OpenBSD's, and
# FreeBSD has a few additional options.
#VersionAddendum FreeBSD-20040419
#Port 22
#Protocol 2
#ListenAddress xxx.xxx.xxx.xxx
#ListenAddress ::
# HostKey for protocol version 1
# HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
# HostKey /etc/ssh/ssh_host_dsa_key
# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768
# Logging
#obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
#LogLevel INFO
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
# Change to yes to enable built-in password authentication.
#PasswordAuthentication no
#PermitEmptyPasswords no
# Change to no to disable PAM authentication
#ChallengeResponseAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
# Set this to 'no' to disable PAM authentication (via challenge-response)
# and session processing.
#UsePAM yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
# no default banner path
#Banner /some/path
# override default of no subsystems
Subsystem sftp /usr/libexec/sftp-server
Gee, idk what I'm doing wrong here.
but this is what I did:
So I generated a public key from MYCOMPUTER, and my user name was root.
I uploaded my rsync.pub into the REMOTECOMPUTER, inside /root/.ssh/authorized_keys
and inside /usr/home/tradone/.ssh/authorized_keys
I set permissions of the .ssh folder and rsync.pub to 777 just in case I have permission problems.
then I restarted sshd by doing /etc/rc.d/sshd forcerestart
145# ssh -l tradone xxx.xxx.xxx.xxx
Password:
asks for password....
145# rsync -avz -e "ssh -i /root/.ssh/rsync" somefile.cpp tradone@xxx.xxx.xxx.xxx:/usr/home/tradone/httpdocs
Password:
also asks for password...
This is some things I did on the REMOTECOMPUTER
149# pwd
/root
149# ls -l
total 20
-rw-r--r-- 2 root wheel 801 May 8 2005 .cshrc
-rw------- 1 root wheel 2448 Apr 29 23:12 .history
-rw-r--r-- 1 root wheel 143 May 8 2005 .k5login
-rw-r--r-- 1 root wheel 293 May 8 2005 .login
-rw------- 1 root wheel 1834 Jul 29 2005 .lsof_www
-rw-r--r-- 2 root wheel 251 May 8 2005 .profile
-rw------- 1 root wheel 1024 Aug 1 2005 .rnd
drwx------ 2 root wheel 512 Apr 30 13:52 .ssh
-rw------- 1 root wheel 19 Feb 28 17:52 dead.letter
149# cd .ssh
149# ls -l
total 4
-rwxrwxrwx 1 root wheel 1120 Apr 30 13:59 authorized_keys
-rw-r--r-- 1 root wheel 605 Aug 24 2005 known_hosts
149#
149# cd /usr/home/tradone/
149# ls -l
total 121612
-rw-r--r-- 1 tradone mysql 767 Jul 31 2005 .cshrc
-rw-r--r-- 1 tradone mysql 248 Jul 31 2005 .login
-rw-r--r-- 1 tradone mysql 158 Jul 31 2005 .login_conf
-rw------- 1 tradone mysql 373 Jul 31 2005 .mail_aliases
-rw-r--r-- 1 tradone mysql 331 Jul 31 2005 .mailrc
-rw-r--r-- 1 tradone mysql 797 Jul 31 2005 .profile
-rw------- 1 tradone mysql 276 Jul 31 2005 .rhosts
-rw-r--r-- 1 tradone mysql 975 Jul 31 2005 .shrc
drwxrwxrwx 2 tradone mysql 512 Apr 30 13:20 .ssh
-rw-r--r-- 1 tradone mysql 86060826 Jan 2 17:34 Adobe Illustrator 10.zip
-rw-r--r-- 1 tradone mysql 35448023 Jan 2 16:29 aab web_presentation.ai
-rw-r--r-- 1 root mysql 67629 Apr 19 09:14 access_log
drwxrwxrwx 9 tradone mysql 1024 Apr 30 12:03 httpdocs
drwxr-xr-x 2 tradone mysql 512 Jul 31 2005 logs
-rw-r--r-- 1 tradone mysql 1120 Apr 30 13:58 rsync_yulswe.pub
-rw-r--r-- 1 root mysql 2775040 Aug 1 2005 squirrelmail-1.4.5.tar
149# cd .ssh
149# ls -l
total 10
-rwxrwxrwx 1 tradone mysql 1120 Apr 30 13:19 authorized_keys
-rwxrwxrwx 1 root mysql 1120 Apr 30 13:19 authorized_keys2
-rwxrwxrwx 1 tradone mysql 1120 Apr 30 13:19 rsync_yulswe.pub
-rwxrwxrwx 1 tradone mysql 1197 Apr 30 12:47 tmp
-rwxrwxrwx 1 tradone mysql 582 Apr 30 12:37 validate-rsync
149#
WHAT IS HAPPENINGS???!!!