LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2010, 03:52 AM   #1
yewint
Member
 
Registered: Dec 2009
Posts: 57

Rep: Reputation: 15
ssh in Ubuntu


Hi geeks,
I have two linux machines and LAN between them. The one is Ubuntu9.10 server and another one Ubuntu8.4 desktop. The hostname of the server is
"ubuntuserver" and the client one "Ubuntu-Linux". I try to access the server with ssh command from client, as in the ssh tutorial found on google search.

Quote:
$ ssh ubuntuserver
all i got is the error ,"ssh: ubuntuserver: Name or service not known"

I am new to ubuntu networking and ssh.I have no idea how to solve it.
I can sucessfully ping to each machines.Any can help me out please?
 
Old 04-30-2010, 04:05 AM   #2
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
Try ssh with ip rather than hostname
 
Old 04-30-2010, 04:10 AM   #3
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Also, check on the server that SSH is running and listening for connections. You can do that with this command:
Code:
sudo netstat -al | grep ssh
which should give you something like this:
Code:
tcp        0      0 *:ssh                   *:*                     LISTEN
Kind regards,

Eric
 
Old 04-30-2010, 04:12 AM   #4
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
Quote:
Try ssh with ip rather than hostname
hi , I got this error again

Quote:
ssh: connect to host 192.1.254.103 port 22: No route to host

Last edited by yewint; 04-30-2010 at 04:14 AM.
 
Old 04-30-2010, 04:17 AM   #5
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hi,

Also, check on the server that SSH is running and listening for connections. You can do that with this command:
Code:
sudo netstat -al | grep ssh
which should give you something like this:
Code:
tcp        0      0 *:ssh                   *:*                     LISTEN
Hi i got nothing .. does it mean that ssh is not running? if so how to run it?
 
Old 04-30-2010, 04:21 AM   #6
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
but when i try in client one , i got this

Quote:
unix 2 [ ACC ] STREAM LISTENING 13832 /tmp/keyring-5a1zOh/ssh
 
Old 04-30-2010, 04:22 AM   #7
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
On this server 192.1.254.103.

See whether ssh is up and running if it si not running

start it
Code:
/etc/init.d/sshd start
 
Old 04-30-2010, 04:25 AM   #8
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Quote:
Originally Posted by yewint View Post
Hi i got nothing .. does it mean that ssh is not running? if so how to run it?
Hello,

PMP already posted how to start it. But did you install it on your server? If it's the same as Debian, then it's not installed by default and you should install it with:
Code:
sudo apt-get install ssh
accepting the dependencies. After that you should be able to connect.

Kind regards,

Eric
 
Old 04-30-2010, 04:34 AM   #9
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
ah, there is no such file as sshd under /etc/init.d/
how do i do? ssh , the one i have now is already installed with the server.
 
Old 04-30-2010, 04:44 AM   #10
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

What do you mean by 'the one I have now'? Did you install a SSH server when you installed Ubuntu server? Can you post the output of following command:
Code:
which sshd
Kind regards,

Eric
 
Old 04-30-2010, 04:48 AM   #11
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hi,

Just saw little error in the post of PMP. The command to start SSH daemon is:
Code:
sudo /etc/init.d/ssh start
if you are logged in as user. If you're logged in as root then you don't have to put the sudo in front. But it's 'ssh', without the 'd', at least on my Debian server (and since Ubuntu is based on Debian I don't think they have changed that).

Kind regards,

Eric
 
Old 04-30-2010, 05:17 AM   #12
PMP
Member
 
Registered: Apr 2009
Location: ~
Distribution: RHEL, Fedora
Posts: 381

Rep: Reputation: 58
@EricTRA

Correct !!, Thanks
 
Old 04-30-2010, 05:26 AM   #13
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
no file as ssh under /etc/init.d/ as well .
do i need to reinstall ssh on the server?
 
Old 04-30-2010, 05:33 AM   #14
yewint
Member
 
Registered: Dec 2009
Posts: 57

Original Poster
Rep: Reputation: 15
oh , the command "which sshd" prompts nothing. It seems i forgot to install ssh server when i install ubuntu server.
 
Old 04-30-2010, 05:54 AM   #15
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295
Hello,

So, that's why you cannot connect

Install it by typing in a terminal:
Code:
sudo apt-get install ssh
if you're logged in as user, or without the sudo if you're root.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Slow ssh connection over lan with Ubuntu Desktop and Ubuntu Server Recursion Linux - Networking 1 05-23-2009 03:17 AM
.ssh in ubuntu preeteshbarretto Linux - Newbie 3 02-25-2009 10:52 AM
ssh in ubuntu taydu3000 Linux - Desktop 2 01-23-2008 07:55 PM
ssh keys in ubuntu binary_dreamer Ubuntu 3 01-20-2008 08:52 PM
Cannot ssh to the ubuntu machine mesh2005 Linux - Networking 5 11-15-2006 08:11 AM


All times are GMT -5. The time now is 10:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration