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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-21-2009, 08:17 PM
|
#1
|
Member
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199
Rep:
|
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
|
|
|
11-21-2009, 08:51 PM
|
#2
|
Member
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Rep:
|
Try
Code:
ssh -vvv kick@remotemachine
This will give you the most verbose output possible.
|
|
|
11-21-2009, 09:01 PM
|
#3
|
Member
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199
Original Poster
Rep:
|
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.
|
|
|
11-21-2009, 09:20 PM
|
#4
|
Member
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199
Original Poster
Rep:
|
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).
|
|
|
11-21-2009, 09:28 PM
|
#5
|
Member
Registered: Jul 2006
Location: Louisville, KY
Distribution: Fedora 12, Slackware, Debian, Ubuntu Karmic, FreeBSD 7.1
Posts: 443
Rep:
|
Quote:
Originally Posted by vendtagain
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.
|
|
|
All times are GMT -5. The time now is 06:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|