OpenVZ Forum


Home » General » Support » ssh service wont start - new vps
ssh service wont start - new vps [message #27774] Tue, 26 February 2008 23:55 Go to next message
rmcnaught is currently offline  rmcnaught
Messages: 2
Registered: February 2008
Location: Bay Area, CA
Junior Member
Hi,

Has anyone seen this problem before, cannot start SSHD from the Host Node on a newly provisioned VPS?

I check /vz/root/103/var/log/secure and it is empty, although I dont know if it normally logs things here, as it is empty. Anyone know how to troubleshoot this?

[root@localhost ~]# vzctl create 103 --ostemplate centos-5-i386-minimal
Creating VE private area (centos-5-i386-minimal)
Performing postcreate actions
VE private area was created
[root@localhost ~]# vzctl set 103 --ipadd 192.168.1.103 --save
Saved parameters for VE 103
[root@localhost ~]# vzctl start 103
Starting VE ...
VE is mounted
Adding IP address(es): 192.168.1.103
Setting CPU units: 1000
Configure meminfo: 65536
VE start in progress...
[root@localhost ~]# vzctl exec 103 service sshd status
sshd is stopped
[root@localhost ~]# vzctl exec 103 service sshd start
Generating SSH1 RSA host key: [FAILED]

Thanks

Robert
Re: ssh service wont start - new vps [message #27780 is a reply to message #27774] Wed, 27 February 2008 07:47 Go to previous message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

from /etc/init.d/sshd
KEYGEN=/usr/bin/ssh-keygen
SSHD=/usr/sbin/sshd
RSA1_KEY=/etc/ssh/ssh_host_key
RSA_KEY=/etc/ssh/ssh_host_rsa_key
DSA_KEY=/etc/ssh/ssh_host_dsa_key
PID_FILE=/var/run/sshd.pid

do_rsa1_keygen() {
        if [ ! -s $RSA1_KEY ]; then
                echo -n $"Generating SSH1 RSA host key: "
                if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
                        chmod 600 $RSA1_KEY
                        chmod 644 $RSA1_KEY.pub
                        if [ -x /sbin/restorecon ]; then
                            /sbin/restorecon $RSA1_KEY.pub
                        fi
                        success $"RSA1 key generation"
                        echo
                else
                        failure $"RSA1 key generation"
                        echo
                        exit 1
                fi
        fi
}


We can enter the VPS and try to execute the following command inside VPS:
$KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N ''

(with or without -q option) and it will might be possible to observe some more information about any errrors.
Previous Topic: VPSVille
Next Topic: VE Routing issue
Goto Forum:
  


Current Time: Thu Aug 15 01:03:42 GMT 2024

Total time taken to generate the page: 0.04029 seconds