Find the answer to your Linux question:
Results 1 to 4 of 4
I have 2 linux hosts. The source host is a Debian machine and the Destination host is a RHEL 3 machine. I need to transfer backups from the Debian machine ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Not working

    I have 2 linux hosts. The source host is a Debian machine and the Destination host is a RHEL 3 machine. I need to transfer backups from the Debian machine to the RHEL machine.

    I have created the Public/Private key pair and copied the public key on the the Red Hat machine.

    Example:

    On the Debian machine I ran the following command:

    ssh-keygen -t rsa

    I then took the public key file and placed it in the /root.ssh directory.

    I have tried many things. I created a authorized_keys file and copied the contents of the public key file in.

    The root user was a last resort. I wanted to do this with a regular user account.

    Nothing has worked. When I SCP to the destination host I am asked for the password.

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    318
    On the destination node:

    1) Make sure /etc/ssh/sshd_config has PubkeyAuthentication set to yes

    2) Make sure the .ssh directory is owned by the user and has permission 700

    3) Make sure authorized_keys file is owned by the user and has permission 600

    If this doesn't help then add the -vvv option on the scp command to put it into verbose mode to see if it shows anything.

    Vic

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    2

    Smile Much Appriciated

    Vic,

    Thank you for your assistance. It was actually the /etc/ssh/sshd_config file that was the issue.

    The line that read "PubkeyAuthentication yes" was commented out.

    Once I un-commented that line everything worked great.

    Thank you again.

    Jim

  4. #4
    Just Joined!
    Join Date
    Nov 2007
    Posts
    1

    Question Hate jumpin the on band wagon...

    I am having a similar problem...
    Made the changes from the previous post... The key is now getting accepted, but getting prompted for password.
    Do I have to turnoff passwords in sshd_config

    Here are the shh -vvv messages

    [root@linuxutil .ssh]# ssh -vvv meckland@blah
    OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    debug1: Connecting to blah [###.###.###.1] port 22.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug3: Not a RSA1 key file /root/.ssh/id_rsa.
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug3: key_read: missing keytype
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug2: key_type_from_name: unknown key type '-----END'
    debug3: key_read: missing keytype
    debug1: identity file /root/.ssh/id_rsa type 1
    debug3: Not a RSA1 key file /root/.ssh/id_dsa.
    debug2: key_type_from_name: unknown key type '-----BEGIN'
    debug3: key_read: missing keytype
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug3: key_read: missing whitespace
    debug2: key_type_from_name: unknown key type '-----END'
    debug3: key_read: missing keytype
    debug1: identity file /root/.ssh/id_dsa type 2
    debug1: Remote protocol version 1.99, remote software version OpenSSH_3.4p1
    debug1: match: OpenSSH_3.4p1 pat OpenSSH*
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_3.9p1
    debug2: fd 3 setting O_NONBLOCK
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
    debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
    debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: none,zlib
    debug2: kex_parse_kexinit: none,zlib
    debug2: kex_parse_kexinit:
    debug2: kex_parse_kexinit:
    debug2: kex_parse_kexinit: first_kex_follows 0
    debug2: kex_parse_kexinit: reserved 0
    debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
    debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
    debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
    debug2: kex_parse_kexinit: none,zlib
    debug2: kex_parse_kexinit: none,zlib
    debug2: kex_parse_kexinit:
    debug2: kex_parse_kexinit:
    debug2: kex_parse_kexinit: first_kex_follows 0
    debug2: kex_parse_kexinit: reserved 0
    debug2: mac_init: found hmac-md5
    debug1: kex: server->client aes128-cbc hmac-md5 none
    debug2: mac_init: found hmac-md5
    debug1: kex: client->server aes128-cbc hmac-md5 none
    debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
    debug2: dh_gen_key: priv key bits set: 126/256
    debug2: bits set: 512/1024
    debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
    debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
    debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
    debug3: check_host_in_hostfile: match line 2
    debug3: check_host_in_hostfile: filename /root/.ssh/known_hosts
    debug3: check_host_in_hostfile: match line 1
    debug1: Host 'blah' is known and matches the RSA host key.
    debug1: Found key in /root/.ssh/known_hosts:2
    debug2: bits set: 523/1024
    debug1: ssh_rsa_verify: signature correct
    debug2: kex_derive_keys
    debug2: set_newkeys: mode 1
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug2: set_newkeys: mode 0
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug2: service_accept: ssh-userauth
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug2: key: /root/.ssh/id_rsa (0x9d0289
    debug2: key: /root/.ssh/id_dsa (0x9d02880)
    debug1: Authentications that can continue: publickey,password
    debug3: start over, passed a different list publickey,password
    debug3: preferred gssapi-with-mic,publickey,keyboard-interactive,password
    debug3: authmethod_lookup publickey
    debug3: remaining preferred: keyboard-interactive,password
    debug3: authmethod_is_enabled publickey
    debug1: Next authentication method: publickey
    debug1: Offering public key: /root/.ssh/id_rsa
    debug3: send_pubkey_test
    debug2: we sent a publickey packet, wait for reply
    debug1: Authentications that can continue: publickey,password
    debug1: Offering public key: /root/.ssh/id_dsa
    debug3: send_pubkey_test
    debug2: we sent a publickey packet, wait for reply
    debug1: Server accepts key: pkalg ssh-dss blen 434
    debug2: input_userauth_pk_ok: fp 9a:e6:e1:66:d1:26:76:16:05:64:fd:b9:5d:ff:ed:07deb ug3: sign_and_send_pubkey
    debug1: read PEM private key done: type DSA
    debug1: Authentications that can continue: publickey,password
    debug2: we did not send a packet, disable method
    debug3: authmethod_lookup password
    debug3: remaining preferred: ,password
    debug3: authmethod_is_enabled password
    debug1: Next authentication method: password

    Enough info???

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...