Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm very new to SSH, and what all you can do with it and I recently began to wonder how I would go about SSHing into a computer that's SSHing my server, through my server. I know I can SSH a computer on the network I'm on, but I've had trouble doing the same thing long distance via my server. I'm sorry if I'm not coming across very clearly, if you need me to elaborate in anyway don't be afraid to ask and I'm open to any and all suggestions.

share|improve this question
Have you tried any SSH commands yet to accomplish your goal? If so, what were the commands, what was the output, and what didn't work? It would be great if you could add the "-v" option to your ssh commands to see verbose output, which might indicate the problem. –  DanB May 15 at 3:08
I tried first SSHing my server then just outright SSHing the computer I need to SSH from the server like I'd do if it was on the same network as my computer, it obviously didn't work... –  user241270 May 15 at 3:12
You'll have to be more specific than "tried ssh and it didn't work". What did you try, and what happened? –  psusi May 15 at 3:20
I entered the following "ssh root@ my server" then once in I entered "ssh user@ip of my second computer" I tried both the public and network given ip both ending in lack of connection. –  user241270 May 15 at 3:25
For the first part, you would have to do a who as your first step, after that depends. Next part: If you are trying to SSH through the internet, to your server (guess that is part of the question), you will need to have a port open on router, or have port forwarding enabled on your router, and having a permanent/static address would probably be needed (without a lot of configuration). Problem is with NAT/PAT, DHCP multiple times, going through you would need a clear view of the path you would take that would be convoluted... unless there is a static address to connect through your router. –  No Time May 15 at 3:28
show 1 more comment

1 Answer 1

With SSH there is a server and a client. Quite literally your Web Server(or what ever machine that has it installed already) has an SSH Server software installed on it that allows you to use your SSH Client software to login. If you want to login to the SSH user that is using the client to login you can do that, but you will need to install an SSH Server on that machine.

Here is a guide https://help.ubuntu.com/14.04/serverguide/openssh-server.html

It is pretty simple to start as long as you don't have a firewall/router that is blocking your the SSH User.

To sum up the guide though and if you aren't blocked further up the network it is as easy as installing the ssh server.

use this command on the original user machine

sudo apt-get install openssh-server

use this command on the original server machine

ssh user@ip

Then just login from what ever machine you want using that details you posted above.

Let me know if this helps.

share|improve this answer
add comment

Your Answer


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.