Any Linux Experts here?

fun4uoc

Supreme Member
Joined
Dec 25, 2007
Messages
1,205
Reaction score
1,049
I'm an extreme newbie when it comes to Linux but am trying to learn as much as I can. I have an unmanaged VPS with full root access running Centos5 and recently ran into some trouble.

Up until yesterday I have been able to have access via ssh using putty but tried to log on yesterday and got a network connect error immediately upon trying to connect.

I logged on to my Virtuozzo control panel and saw that ssh was set to start automatically but was currently stopped. I tried restarting it and got the following error.


Start service - Failed
Started Operation Status
Nov 15, 2008 07:27:43 PM Operation start with the VPS(s) VEID51266923 service "sshd" is started. Completed
Nov 15, 2008 07:27:43 PM Starting sshd: /etc/ssh/sshd_config: line 40: Bad configuration option: adduser Completed
Nov 15, 2008 07:27:43 PM /etc/ssh/sshd_config: line 41: Bad configuration option: passwd Completed
Nov 15, 2008 07:27:43 PM /etc/ssh/sshd_config: terminating, 2 bad configuration options Completed
Nov 15, 2008 07:27:43 PM [FAILED] Completed
Nov 15, 2008 07:27:43 PM Operation start with the VPS(s) VEID51266923 service "sshd" is finished with errors: #703 Can not start/stop/restart service: Starting sshd: /etc/ssh/sshd_config: line 40: Bad configuration option: adduser /etc/ssh/sshd_config: line 41: Bad configuration option: passwd /etc/ssh/sshd_config: terminating, 2 bad configuration options [FAILED] . Failed

I am able to put the server into repair mode and can then log on via ssh but am unsure where to go from there. Any help would be much appreciated.
 
Last edited:
This isnt making any sense to me. This is what I get via ssh while in repair mode.


=============== VPS REPAIR MODE ===============
Your VPS is under repair mode now.
You can access the file system of your VPS under /repair directory.
To finish repair mode, either login in Virtuozzo Power Panel and select "Stop
Repair", or just reboot your VPS using 'shutdown -r now' command.
=============== VPS REPAIR MODE ===============
[root@s15323783 ~]# vi /etc/ssh/sshd_config
# $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
"/etc/ssh/sshd_config" 118L, 3300C
 
Sorry, the first copy and paste didn't work right. Here it is.

[root@s15323783 ~]# vi /etc/ssh/sshd_config
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# 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 mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem sftp /usr/libexec/openssh/sftp-server
 
Anyone else have any ideas????
 
That did it, thanks and rep given. Don't know why I didn't figure that out myself.
 
Back
Top