LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-21-2009, 09:17 PM   #1
vendtagain
Member
 
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199

Rep: Reputation: 32
ssh - Permission Denied?


when trying:
Code:
slogin kick@remotemachine
i get:
Code:
Permission denied (publickey,password,keyboard-interactive).

Local Machine
Code:
# ls -al ~/.ssh/
# on local machine
total 16
drwx------    4 Eric  Eric   136 Nov 21 19:24 .
drwxr-xr-x   47 Eric  Eric  1598 Nov 21 19:55 ..
-rw-r--r--    1 Eric  Eric   602 Nov 21 16:18 id_dsa.pub
-rw-r--r--    1 Eric  Eric   999 Nov 21 19:53 known_hosts
Code:
#ssh_config on local machine
-rw-r--r--    1 root  wheel      337 Nov 21 19:55 ssh_config
Code:
#ssh_config file on local machine

Host *

RhostsAuthentication no
RhostsRSAAuthentication no
PasswordAuthentication yes
BatchMode yes
Port 22
Remote machine:
Code:
# ls -al ~/.ssh/
# on remote machine
total 20
drwx------ 2 kick him   4096 2009-11-21 20:58 ./
drwxr-xr-x 7 kick admin 4096 2009-11-15 21:45 ../
-rw------- 1 kick him    602 2009-11-21 20:18 authorized_keys
-rw-r--r-- 1 root root     0 2009-11-21 20:58 dotsshlog
-rw------- 1 kick him    668 2009-11-21 20:13 id_dsa
-rw-r--r-- 1 kick him    602 2009-11-21 20:13 id_dsa.pub
Code:
# ls -al /etc/ssh
# on remote machine
total 156
drwxr-xr-x  2 root root   4096 2009-11-21 20:55 ./
drwxr-xr-x 27 root root   4096 2009-11-21 20:17 ../
-rw-r--r--  1 root root      0 2009-11-21 20:55 etcsshlog.txt
-rw-r--r--  1 root root 125811 2009-11-21 19:43 moduli
-rw-r--r--  1 root root    328 2009-11-21 16:48 ssh_config
-rw-------  1 root root   1675 2009-11-21 20:09 ssh_host_key
-rw-r--r--  1 root root    394 2009-11-21 20:09 ssh_host_key.pub
-rw-r--r--  1 root root    471 2009-11-21 20:44 sshd_config
-rw-r--r--  1 root root    470 2009-11-21 20:07 sshd_config~
Code:
# sshd_config on remote machine
Port 22
ServerKeyBits 1024
LoginGraceTime 600
PermitRootLogin yes
StrictModes yes
X11Forwarding no
PrintMotd yes
LogLevel INFO
RhostsAuthentication no
RhostsRSAAuthentication no
RSAAuthentication yes
PasswordAuthentication yes
PermitEmptyPasswords yes
 
Old 11-21-2009, 09:51 PM   #2
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 47
Try

Code:
ssh -vvv kick@remotemachine
This will give you the most verbose output possible.
 
Old 11-21-2009, 10:01 PM   #3
vendtagain
Member
 
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199

Original Poster
Rep: Reputation: 32
Exclamation

Well, I was thinking I didn't have all the correct files on the local machine,
ssh_config is the only ssh i had in the /etc/ folder.

I decided to see how ssh would react if I didn't have ssh_config available. Instead of throwing me an error though, it actually let me slogin to the remote machine.
I'm still hella confused about ssh tho, all documentation i've found is horrible in explaining the subject.
 
Old 11-21-2009, 10:20 PM   #4
vendtagain
Member
 
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199

Original Poster
Rep: Reputation: 32
Quote:
Try

Code:
ssh -vvv kick@remotemachine
This will give you the most verbose output possible.
Thanks for the reply.
After putting the ssh_config file back where it belongs, then running
Code:
ssh -vvv kick@remotemachine
I noticed a couple suspicious items in the output, which I'm not sure what to make of.

1.
Code:
debug1: An invalid name was supplied
Configuration file does not specify default realm
realm? I haven't heard this term related to ssh

2. this is the last few lines, after it "offers" the id_dsa, looks like the last 7 lines here have something to do with the problem, but I don't know what to make of it....

Code:
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/Eric/.ssh/identity
debug3: no such identity: /Users/Eric/.ssh/identity
debug1: Trying private key: /Users/Eric/.ssh/id_rsa
debug3: no such identity: /Users/Eric/.ssh/id_rsa
debug1: Offering public key: /Users/Eric/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey,password,keyboard-interactive).
 
Old 11-21-2009, 10:28 PM   #5
bartonski
Member
 
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Blog Entries: 1

Rep: Reputation: 47
Quote:
Originally Posted by vendtagain View Post
Well, I was thinking I didn't have all the correct files on the local machine,
ssh_config is the only ssh i had in the /etc/ folder.

I decided to see how ssh would react if I didn't have ssh_config available. Instead of throwing me an error though, it actually let me slogin to the remote machine.
I'm still hella confused about ssh tho, all documentation i've found is horrible in explaining the subject.
ssh_config only defines how the ssh client acts; everything defined in ssh_config can be given as an argument to ssh. The really important configuration file is sshd.config (sshd is the ssh daemon, i.e. ssh server) on the machine being logged in to.

Using the 'ssh -vvv' will show all interactions between client and server, and will give some clues as to which, if any configuration items need to be changed in sshd.conf.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ssh problem - permission denied windstory Linux - Newbie 4 03-11-2009 05:26 PM
SSH command, permission denied Abstractt Linux - Newbie 2 11-12-2007 07:14 AM
SSH: Permission denied, please try again. sanatox Linux - Security 3 01-15-2007 10:47 PM
ssh -Permission denied zaphod_es Linux - Networking 4 05-21-2006 02:56 PM
SSH Permission Denied Chimney Linux - Security 1 11-10-2005 07:01 PM


All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration