ssh remote login

Asked by Saul Lubkin

I wish to enable remote login to my Ubuntu 9.04 Gateway computer, using ssh.

I suspect that I have to install some additional ssh-related package.

Please advise.

Thanks you,

Saul Lubkin

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Solved by:
Saul Lubkin
Solved:
Last query:
Last reply:
Revision history for this message
Steven Danna (ssd7) said :
#1

On the computer you want to connect to all you should have to do is the following:

sudo apt-get install openssh-server

On any client computer an ssh client should already be installed however, if it isn't, it can be installed with:

sudo apt-get install openssh-server

The server itself should be configured fairly sanely by default, but for more information on configuring your ssh server see:

https://help.ubuntu.com/9.04/serverguide/C/openssh-server.html

Revision history for this message
Steven Danna (ssd7) said :
#2

I seem to be typo-prone today. To install ssh-client software you want:

sudo apt-get install openssh-client

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

sudo apt-get install openssh-server

This will also add itself to your init scripts and start at bootup. You can now access the computer on port 22 with:

ssh username@servername

or from windows

putty username@username

X forwarding is enabled by default, if you use:

ssh -X username@servername

or

putty -X username@server (assuming you have installed and ran XMing)

then you can run gui based apps over the connection securely. This is better than VNC which has zero security (You can use VNC through the ssh tunnel to add security)

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#4

Thanks, all!

I installed openssh-server, and this solved most of the problem -- but not quite all of it.

My home setup was originally an old Debian setup. There is an old Debian server on it; the new gateway with Ubuntu 9.04 is connected to the same router. When I login to my home system from a remote location using ssh, it puts me on the old Debian server -- not the new Ubuntu Gateway. I can get from the old Debian server to the new Ubuntu gateway easily now with ssh (I've also setup my keys, so no passwd is required). I'd like to be able to get, from a remote location, directly to the Ubuntu gateway, without having to pass through the old Debian server.

(I just tried simply unplugging the old Debian server's Ethernet cable; that certainly didn't help! I then couldn't even use ssh to get, e.g., to my work email -- reconnecting the old debian server fixed that).

I think I'm missing some fundamental issues -- like why, when I just disconnected my old Debian server from the internet, was the new Ubuntu Gateway unable to resolve the login my work login address?

Help GREATLY appreciated!

Thank you!

:)

Yours sincerely,

  -- Saul

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

You port forwarding is not setup correctly. You need to setup the system you setup openssh-server on to have a static ip (makes life easier). You then need to access your router and reconfigure the port to be sent, not to the debian system, but to the Ububtu system. Its a simple IP swap in the router.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#6

(1) How do I setup openssh-server to have a static ip?

(2) How do I make the "simple ip swap" in my router?

(3) When I try doing the ip swap, should I first remove power from my router? What about the modem?

(4) Do I have to shut down all computers connected to the router? If so, should this be done before shutting down the router or after?

I'm sorry for being so ignorant -- but, actually, I tried guessing it out -- and now things are so badly configured (all computers in the house -- there are four, including the my Ubuntu gateway and my old Debian server (the other two use Windows Vista),
that remote login to my home system isn't working anymore.

Also,

(5) How do i find the ip address of my home system?

(:

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

(1) SSH doesnt have a static IP, the network card does. You most likely use automatic configuration (DHCP) but this will cause issues if your system gets a different IP address when it boots.

(2) You need to access your router with a web browser (Type its IP in the address bar) and re-configure the port forwarding or virtual server, the terminology varies between vendors and you will need to consult your manual if you are unfamiliar.

(3) The IP swap will be done in software and the router will reboot to apply it, the modem is fine and does not need touching

(4) No you do not have to reboot any PCs

(5) The IP of the PC can be gained by running:
ifconfig
in a terminal. If you would like to know your WAN IP that you will connect to you can visit www.ipchicken.com

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#8

Hi.

I greatly appreciate your help -- but I'm still confused. My Router is a Linksys 4 Port Router, serial number SCO102A09278.

I don't have the manual; so I don't know how to setup a static ip address.

Running ifconfig gives me the address 192.168.1.100.

Attemping ssh saul@192.168.1.100 hangs.

I believe it should get me to s carbon copy of my original window.

Can you help?

Help much appreciated.

:)

Yours,

-- Saul

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

ifconfig gives you the ip of the local system. You can test the service is running ok by running

ssh $USER@localhost

and it will as you to log in. If this works then the service is running and accepting connections. If it does not connect run:

sudo /etc/init.d/ssh restart

and retry.

You can then run

ifconfig

which you have found to get the IP of the server and connect to that (I',m guessing 192.168.1.100 is your server but I assume nothing on here) and connect to it.

Can you ping the IP address. The command is:

ping 192.168.1.100

use CTRL+C to stop it pinging.

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#10

I am VERY hapy to say, that his DID solve my problem!

There was one other difficulty, however, that I had to fix first:
sudo /etc/init.d/ssh restart did not work properly -- it complained about garbage at the end of /etc/ssh/sshd_config. So, I moved this file, to a different name, so that it would be ignored.

I then reasoned,that I had to reinstall ssh-openserver; which I did, with the command:

sudo apt-get install --reinstall openssh-server

Then, remote login to my machine worked, just as I wanted it to -- and I now DON"T have to pass first through my old Debian server (also on my home network) first.

(I'll check next wheter or not I can reach that; not the tha's too important)

Thank you very much,

Actionparsnip!

:)

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Awesome, glad you got the goal. Nice to hear a happy ending :D

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#12

And thank YOU, very much, actionparsnip!

:)

-- Saul

On 6/14/09, actionparsnip <email address hidden> wrote:
> Your question #73982 on openssh in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/openssh/+question/73982
>
> actionparsnip posted a new comment:
> Awesome, glad you got the goal. Nice to hear a happy ending :D
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>