Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently became interested in SSH, and so I attempted to set up a SSH server on my Linux laptop. I am running moonOS, a version of Ubuntu with the Enlightenment WM.

First of all I ran "sudo apt-get install openssh-server". All fine. Now I looked at the settings for my router, and though I saw no settings explicitly called "port forwarding", there was a checkbox to enable SSH. I checked this box and set the port to 22. After this I tried "ssh localhost", and it connected fine.

Now I checked my IP address using, then ran PuTTY on my WinXP laptop, entering the IP address, the port, selecting SSH, etc. Then PuTTY complained that "the connection was refused". Okay. I booted a Jolicloud LiveUSB on my netbook and ran "ssh [my user name]@[my IP address]". Again, the connection was refused.

So off I ran to the internet and looked up the documentation for OpenSSH. In a wild guess, I tried running "sshd" on the moonOS laptop, but it just replied, "sshd re-exec requires execution with an absolute path".

Some help? I have no idea what I'm doing wrong here.

share|improve this question
I half suspect that you enabled SSH login for the router itself with that checkbox. That is, some routers allow you to ssh into them in order to make changes to the router securely (and remotely). Also, how exactly are you trying to log in via ssh? Are you specifying a user? It should look something like ssh user@myip.etc, not just ssh myip.etc – Telemachus Oct 4 '10 at 11:26
Ah, also, to stop, start or restart sshd (say to load new configuration settings), you will probably need something like this: sudo /etc/init.d/ssh [stop, start, restart]. You only want one of the commands in the brackets at a time - an no brackets. – Telemachus Oct 4 '10 at 11:32
Yes, I am logging in with a command "ssh [username]@[ip]". Except for the one time I did "ssh localhost", at which I was asked for my one user's password and connected properly. – Sasha DeTreurz Oct 4 '10 at 11:33

sshd re-exec requires execution with an absolute path"

For that part, run it with a full path, for example


instead of just sshd

share|improve this answer

What type of router do you have? It would appear that you enabled SSH for your router, as opposed to forwarding port 22 to point to your laptop.

You need to forward TCP port 22's traffic to your laptop's IP.

share|improve this answer
Aha, I see! I probably was enabling SSH for the router--I was wondering why I didn't need to put in my laptop's IP. I'll go try to find how to do the port forwarding. Thanks! – Sasha DeTreurz Oct 4 '10 at 11:34

Something that you should be aware of, is that for some reason many routers won't allow you to loop out and back to an internal address.

What this means is that if both computers are on the same network, you may not be able to ssh to your public IP address, and have the port forwarded to an internal IP.

I don't really know much about this, but I encountered this issue last week, and had to perform testing on a computer outside of my local network for success.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .