LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2012, 08:24 PM   #1
reklaimer
LQ Newbie
 
Registered: Jun 2012
Distribution: Ubuntu Server 10.10 Xubuntu 12.04
Posts: 3

Rep: Reputation: Disabled
Exclamation SSH Troubles: ssh: Could not resolve hostname: Name or service not known -Xubuntu12


So, i have an Ubuntu 10.10 Server on my home network running openssh. I am able to ssh into it via my work's PC running putty and i can also ssh into it on my Windows 7 machine here at home. I have a laptop dual booted with Windows 7 and Xubuntu 12.04 When i try to ssh into my server i get the message:

Could not resolve hostname 10.1.2.150:14747: Name or service not known.

I have changed the default port on the open ssh config to 14747.

So, I've installed putty on my Xubuntu laptop, and it connects fine to my server. Why would it not allow me to connect to it using the terminal?

These are the ways i've tried to ssh:

ssh 10.1.2.150:14747 -l (username)

and

ssh (username)@(hostname)

ssh (username)@(ipaddress)

Is this an issue anyone has experienced with Xubuntu? Am i doing something wrong? Any thoughts would be greatly appreciated.
 
Old 06-02-2012, 08:59 PM   #2
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Are you sure that sshd is listening on that port?
Whats the output of
Code:
netstat -pant
on your server? that should tell you what ports sshd is listening on.

Actually i just found out from another post that "netstat -ltn" might work even better to see where sshd is listening
Sorry thats -ltn not -lta, you need the n to get the actual port numbers.

Last edited by fogpipe; 06-02-2012 at 09:08 PM.
 
Old 06-02-2012, 10:59 PM   #3
reklaimer
LQ Newbie
 
Registered: Jun 2012
Distribution: Ubuntu Server 10.10 Xubuntu 12.04
Posts: 3

Original Poster
Rep: Reputation: Disabled
Sorry, i forgot i changed my default SSH port to 18287 instead of 14747.


reklaimer@watson:~$ netstat -ltn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 10.1.2.150:5001 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:18287 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7634 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:61558 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:19000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:15232 0.0.0.0:* LISTEN
tcp6 0 0 :::9412 :::* LISTEN
tcp6 0 0 :::39944 :::* LISTEN
tcp6 0 0 :::4040 :::* LISTEN
tcp6 0 0 :::18287 :::* LISTEN
tcp6 0 0 :::61558 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 :::15232 :::* LISTEN
 
Old 06-03-2012, 02:32 AM   #4
amilo
Member
 
Registered: Oct 2011
Location: Nederland
Distribution: Debian, Centos, Ubuntu
Posts: 81

Rep: Reputation: Disabled
ssh user@host -p 18287

Read man ssh
 
Old 06-03-2012, 02:53 AM   #5
reklaimer
LQ Newbie
 
Registered: Jun 2012
Distribution: Ubuntu Server 10.10 Xubuntu 12.04
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks amilo that did it! For whatever reason, i never realized that -p was for port. I became custom to one way of sshing (via default port) so i never had to use it before. All of my other installs of linux never gave me this kind of trouble when using my normal method. Thanks again.
 
  


Reply



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
FC13 install can ping by hostname, ssh by hostname fails jeffk42 Linux - Networking 4 11-14-2011 11:27 AM
ssh hostname d-x-4 Linux - Networking 3 04-30-2010 04:08 PM
can't ssh using hostname deepesh1081 Linux - Networking 1 05-06-2007 07:11 AM
can ssh by IP, can't by hostname. FLOODS Linux - Networking 7 09-19-2005 01:41 PM
can't ssh through hostname romel Linux - Networking 4 07-25-2004 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:20 PM.

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
Open Source Consulting | Domain Registration