Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm setting up some server but I stubbled into an issue with one server.

I setup a local dns server, and when I try to connect to this server with ssh alpha@alpha.stvns.com I will get : Permission denied (publickey,keyboard-interactive).

But when I access it like alpha@192.168.1.2 it works fine with Pubkey Auth. Strange part is when I connect to a server git.stvns.com => a hostname managed by the dns server, it will connect fine when using the hostname.

I'm using a ubuntu 10.04 amd64 as base for all the server, they are actually identical images I took a snapshot from the bare minimum setup, so can't blame the OS.

I compared my sshd_config files but they are almost Identical, only the place of the authorized_keys is different, can't blame that full for giving problems.

Locally I removed my known_hosts related to the dns server and tried again without any luck.

This is a copy of my sshd_config file maybe someone spots a error:

Port                             22
Protocol                         2
HostKey                         /etc/ssh/ssh_host_rsa_key
HostKey                         /etc/ssh/ssh_host_dsa_key
UsePrivilegeSeparation          yes
LoginGraceTime                  20
PermitRootLogin                 no
RSAAuthentication               yes
RhostsRSAAuthentication         yes
HostBasedAuthentication         no
PubkeyAuthentication            yes
AuthorizedKeysFile              /etc/ssh/authorized_keys
PermitEmptyPasswords            no
PasswordAuthentication          no
StrictModes                     no
ClientAliveInterval             60
ClientAliveCountMax             0

# Host Specific !!!!!
ListenAddress                   192.168.1.61

# List of allowed users
AllowUsers                      alpha

# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

# Logging
SyslogFacility AUTH
LogLevel INFO

X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no

# Allow client to pass locale environment variables
AcceptEnv LANG LC_*

Does anyone countered the same problem? Or has some advise?

Thanks a lot in advance!

share|improve this question
4  
Use "ssh -v" and you will see why. The problem is probably into your ssh_config (not into ssd_config) or because your ~/.ssh/know_host contain a wrong value. –  Gregory MOUSSAT Apr 22 '12 at 21:43
2  
You just set up a DNS server, and now youre saying that logging into a machine via its DNS hostname doesnt work, but via its IP does. Since you've been playing with DNS, start simple. Are you sure alpha.stvns.com is resolving to 192.168.1.2? –  Patrick Apr 22 '12 at 23:22
    
Yes I can dig and nslookup it no problem using resolving the hostname –  Niels Apr 23 '12 at 6:55
    
Do you have SELinux running? –  Khaled Apr 23 '12 at 7:32
    
No I'm running ubuntu and as client mac os x. But I solved my issue apperently I needed to flush the dns cache on my mac with this command: dscacheutil -flushcache –  Niels Apr 24 '12 at 8:45

1 Answer 1

run

ping git.stvns.com

Are you see 192.168.1.2 ip?

I think you havenot problem with ssh, you have problem with dns.

What dns server are you use? (cat /etc/resolv.conf )

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.