Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Background kernel: 3.0.0-14-generic OS: Ubuntu 11.10 - desktop

Problem: Cant start ssh daemon System Log (Snippet):

[  451.862562] init: ssh main process (3042) terminated with status 255
[  451.862641] init: ssh main process ended, respawning
[  451.873345] init: ssh main process (3045) terminated with status 255
[  451.873405] init: ssh main process ended, respawning
[  451.883863] init: ssh main process (3048) terminated with status 255
[  451.883923] init: ssh main process ended, respawning
[  451.895982] init: ssh main process (3051) terminated with status 255
[  451.896090] init: ssh main process ended, respawning
[  451.907059] init: ssh main process (3054) terminated with status 255
[  451.907130] init: ssh main process ended, respawning
[  451.917883] init: ssh main process (3057) terminated with status 255
[  451.917951] init: ssh respawning too fast, stopped

Problem occurs at boot and also trying to manually do command (either of commands):

sudo service ssh start
sudo /etc/init.d/ssh start

Attempted fixes:

  1. Within sshd_config: Changed ListenAddress to both 0.0.0.0 and the actual LAN IP address
  2. Sent HUP to ssh process (well there was no ssh process so end result did nothing).
  3. Reinstalled openssh-server

Haven't done anything with upstart.

Recommendations?

References below

sshd_config file:

# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 22

# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0

Protocol 2

# 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
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes

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

# Logging
SyslogFacility AUTH
LogLevel INFO

# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no

# Change to no to disable tunnelled clear text passwords
PasswordAuthentication no


# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes

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

#MaxStartups 10:30:60
#Banner /etc/issue.net

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

Subsystem sftp /usr/lib/openssh/sftp-server

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication.  Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
;UsePAM yes

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

# Set up the bridge interface for OpenVPN
#auto br0
#iface br0 inet static
#address 10.0.1.199
#netmask 255.255.255.0
#gateway 10.0.1.1
#bridge_ports eth0

#iface eth0 inet manual
#up ifconfig $IFACE 0.0.0.0 up
#up ip link set $IFACE promisc on
#down ip link set $IFACE promisc off
#down ifconfig $IFACE down

Additional Output:

ps auxw | grep ssh
kevdog    1916  0.0  0.0   3856   180 ?        Ss   10:12   0:00 /usr/bin/ssh-agent  /usr/bin/dbus-launch --exit-with-session /usr/bin/gnome-session --session=gnome-with-compiz
kevdog    3170  0.0  0.0   4448   796 pts/0    S+   11:32   0:00 grep --color=auto ssh
share|improve this question
    
It'd be helpful to know if there are any SSH-related process running. Please add the output of this command: ps auxw | grep ssh –  cqcallaw Jan 27 '12 at 16:54
    
Thanks for helping. Here is my result: ps auxw | grep ssh kevdog 1916 0.0 0.0 3856 180 ? Ss 10:12 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session /usr/bin/gnome-session --session=gnome-with-compiz kevdog 3170 0.0 0.0 4448 796 pts/0 S+ 11:32 0:00 grep --color=auto ssh –  Kevin Jan 27 '12 at 17:32
    
I added the results to the original post so they could be more readable. They are posted at the bottom of the the OP –  Kevin Jan 27 '12 at 17:44
    
Hmm, nothing out of place there. Running sshd in debug mode should give you some useful debug output, could you run sudo /usr/sbin/sshd -ddd from a command prompt and add that output? –  cqcallaw Jan 27 '12 at 18:21
add comment

1 Answer

The problem was creating following line

;UsePAM yes

It should be like

UsePAM yes
share|improve this answer
    
Yes your were right -- I do feel very silly about wasting everyone's time. Making the appropriate changes to the UsePAM line did the trick. Thank you everyone. –  Kevin Jan 27 '12 at 18:25
add comment

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.