Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Weird! Can't start SSH service on a OpenVZ VPS
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Weird! Can't start SSH service on a OpenVZ VPS

ZenoZeno Member
edited March 2013 in Help

I purchased a Ramnode OpenVZ 128M VPS(Node:ATLSVZ1) has been running well until two days ago

After the reboot, SSH can not connect,I can only use "serial console" access to the system

and I can't start OpenSSH-server even Dropbear
Can anyone help me figure out why? Any suggestions will be appreciated, Thanks a lot!

root@ssd:/# ps auxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 1.0 2500 1352 ? Ss 17:38 0:00 init
root 2 0.0 0.0 0 0 ? S 17:38 0:00 [kthreadd/1946]
root 3 0.0 0.0 0 0 ? S 17:38 0:00 _ [khelper/1946]
root 252 0.0 0.6 2332 904 ? Ss 17:38 0:00 cron
root 502 0.0 0.5 27476 760 ? Ss 17:41 0:00 vzctl: pts/0
root 503 0.0 1.2 3000 1648 pts/0 Ss 17:41 0:00 _ -bash
root 533 0.0 0.6 2388 880 pts/0 R+ 17:58 0:00 _ ps auxf

root@ssd:/# free -m
total used free shared buffers cached
Mem: 128 28 99 0 0 25
-/+ buffers/cache: 2 125
Swap: 128 0 128

root@ssd:/# /etc/init.d/ssh start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service ssh start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start ssh
ssh stop/pre-start, process 581

root@ssd:/# /etc/init.d/dropbear start
Starting Dropbear SSH server: dropbear.

root@ssd:/# netstat -nl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 1033737609 @/com/ubuntu/upstart

Comments

  • Are you seeing messages in /var/log/messages or any of the associated processes' log files?

  • KrisKris Member
    edited March 2013

    After starting dropbear or ssh....

    ps ax|grep dropbear
    

    Get the process ID (PID) and use strace to see where it's failing / timing out.

    Should see some activity / errors when trying to connect to the port once the daemon's started.

    strace -p [PID]
    
  • ZenoZeno Member

    @Damian said: Are you seeing messages in /var/log/messages or any of the associated processes' log files?

    Thanks, No, the /var/log/messages is empty

    root@ssd:/# date
    Sun Mar 24 23:05:52 CST 2013

    root@ssd:/# cat /var/log/messages
    Jan 9 06:51:30 ssd syslogd 1.5.0#5ubuntu4: restart.
    Jan 9 06:56:53 ssd exiting on signal 15
    Jan 9 06:56:55 ssd syslogd 1.5.0#5ubuntu4: restart.
    Jan 9 06:58:18 ssd exiting on signal 15

  • ZenoZeno Member
    edited March 2013

    @Kris said: After starting dropbear or ssh....

    Thanks Kris, I tried but can't get any process ID (PID) by name dropbear/ssh:

    Dropbear

    root@ssd:/# /etc/init.d/dropbear start
    Starting Dropbear SSH server: dropbear.

    root@ssd:/# ps ax|grep dropbear
    1021 pts/0 S+ 0:00 grep --color=auto dropbear

    OpenSSH-Server

    root@ssd:/# /etc/init.d/ssh start
    Rather than invoking init scripts through /etc/init.d, use the service(8)
    utility, e.g. service ssh start

    Since the script you are attempting to invoke has been converted to an
    Upstart job, you may also use the start(8) utility, e.g. start ssh
    ssh stop/pre-start, process 1132

    root@ssd:/# ps ax|grep ssh
    1135 pts/0 S+ 0:00 grep --color=auto ssh

    root@ssd:/# strace -p 1132
    attach: ptrace(PTRACE_ATTACH, ...): No such process

  • Sshd keys present in /etc/ssh/ssh_hostkey ?

Sign In or Register to comment.