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

When I attempt to execute any commands such as /etc/init.d/ssh restart or /etc/init.d/ssh start, I get no output. It just goes to the next command line (Ubuntu Hardy). I can even pass in junk parameters such as /etc/init.d/ssh asldkfjalskfdj and i get no warnings or error messages, it just goes to the next line. I can check in my processes:

lsof -i :22

and don't see my ssh process. I also don't see my SSH process when i run:

netstat -na --inet

Any troubleshooting suggestions?

THANK YOU ALL SO MUCH!! I have no idea how i got rid of it, but apparently i killed my SSH install. A quick sudo apt-get install ssh openssh-server did the trick!! I really appreciate you all taking time out of your day to help me out!

share|improve this question
1  
try sudo apt-get install openssh-server –  Journeyman Geek Mar 23 '10 at 7:04
add comment

3 Answers 3

up vote 2 down vote accepted

The script will exit immediately if the /usr/sbin/sshd binary can not be found and executed. Can you ls -l /usr/bin/sshd?

share|improve this answer
    
I don't have a /usr/bin/sshd though i do have a /usr/bin/ssh, the output of /usr/bin/sshd is: -rwxr-xr-x 1 xuserx xuserx 316640 2008-05-14 14:39 /usr/bin/ssh –  Schneems Mar 23 '10 at 2:19
    
In that case you're missing the actual sshd daemon. Reinstall the openssh-server package. –  theotherreceive Mar 23 '10 at 9:18
add comment

When attempting to debug what a shell program is doing, you can use the set -x option to instruct the shell to display each expanded command before it executes the command:

$ sudo /etc/init.d/ssh foo
$ sudo sh -x /etc/init.d/ssh foo
+ set -e
+ test -x /usr/sbin/sshd
+ umask 022
+ export SSHD_OOM_ADJUST=-17
+ test -f /etc/default/ssh
+ . /etc/default/ssh
[…]
share|improve this answer
    
Output is as follows. Looks like i don't have a /usr/sbin/sshd. I have no clue how i could have accidentally deleted it. Any clue how I might go about getting back my long lost file? +set-e / + test -x /usr/sbin/sshd / + exit 0 / –  Schneems Mar 23 '10 at 2:23
add comment

Try starting it in debug mode and look for errors.

sudo /usr/sbin/sshd -def /etc/ssh/sshd_config
share|improve this answer
    
looks like i don't have a /usr/sbin/sshd file which is most likely part of the problem. This server has worked for the last ~6 months, and last time i was in it i certainly didn't go around deleting files in my usr/sbin folder, no matter...though i would like to have the file back. Any suggestions? –  Schneems Mar 23 '10 at 2:28
    
i don't use ubuntu but i think you should be able to install with "sudo apt-get install ssh" –  anonymouse Mar 23 '10 at 2:42
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.