You are not logged in.

#1 2012-01-22 20:33:37

NebraskaBoy
Member
Registered: 2012-01-22
Posts: 2

SSH - Permission Denied (Public Key)

Now i know im new, but before i get started just know ive read about 3 or 4 different how to's, a few threads and even called a buddy for help but to no avail. Im trying to ssh to my router running on DD-WRT. Ive got my RSA keys generated, placed the public key into Auth_Keys on the server side. So heres the setup;

sshd_config

#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# The default requires explicit activation of protocol 1
#Protocol 2

# 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
#HostKey /etc/ssh/ssh_host_ecdsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 1024

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

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10

#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile  .ssh/authorized_keys

And my debug ( ssh -vvv user@external.ip)

debug1: Connection established.
debug1: identity file /home/daniels/.ssh/id_rsa type 1
debug1: identity file /home/daniels/.ssh/id_rsa-cert type -1
debug1: identity file /home/daniels/.ssh/id_dsa type -1
debug1: identity file /home/daniels/.ssh/id_dsa-cert type -1
debug1: identity file /home/daniels/.ssh/id_ecdsa type -1
debug1: identity file /home/daniels/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version dropbear_0.52
debug1: no match: dropbear_0.52
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.9
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: RSA f3:5a:e2:e6:55:a7:f6:d6:46:01:83:92:8d:67:45:f8
debug1: Host '209.180.106.155' is known and matches the RSA host key.
debug1: Found key in /home/daniels/.ssh/known_hosts:11
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
DD-WRT v24-sp2 mini (c) 2010 NewMedia-NET GmbH
Release: 09/23/10 (SVN revision: 15257)
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/daniels/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/daniels/.ssh/id_dsa
debug1: Trying private key: /home/daniels/.ssh/id_ecdsa
debug1: No more authentication methods to try.
Permission denied (publickey).

Iv'e tried channing permissions, and everything else i can think of, maybe i just need another pair of eyes to comb it over. Let me know what you guys think.
im setting this up to eventually run a home server.

Offline

#2 2012-01-22 20:55:49

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: SSH - Permission Denied (Public Key)

NebraskaBoy wrote:

Now i know im new, but before i get started just know ive read about 3 or 4 different how to's, a few threads and even called a buddy for help but to no avail. Im trying to ssh to my router running on DD-WRT. Ive got my RSA keys generated, placed the public key into Auth_Keys on the server side. So heres the setup;

You've glossed over a lot here. You haven't even given links for the how-tos you're working off - but if you did, that would still be insufficient.

Please show the commands you used to generate and transfer the keys, step-by-step, methodically.

Offline

#3 2012-01-22 21:24:37

NebraskaBoy
Member
Registered: 2012-01-22
Posts: 2

Re: SSH - Permission Denied (Public Key)

To generate;

ssh-keygen -t rsa

Hit enter 3x, so it saved in ~/home/daniels/.ssh/id_rsa (also created the .pub with out a pass phrase
I have physical access to the router which is a Cisco M10 running DD-WRT, so i manually input the public key into the router.
If you need any information just ask, on the how to's most were very similar in nature in the it showed how to generate and disperse the keys and what setting you need on you config files.
I personally think i screwed up my permissions on my user account.
used;

chmod 700 ~/  & chmod 700 ~/.ssh

ending up locking myself out of .ssh so i went under su and set it to

chmod u=xwr ~/.ssh

Offline

#4 2012-01-22 21:34:02

echo.unity
Member
Registered: 2011-11-14
Posts: 68

Offline

Board footer

Powered by FluxBB