LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-31-2011, 05:29 AM   #1
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Rep: Reputation: Disabled
ssh server


I am using Ubuntu 10.04 Lucid Lynx. I have installed openssh-server. When I try to connect to remote systems I get a message as "could not resolve hostname : Name or server not known" What does it mean. What should I do?
Thanks in advance..
 
Old 07-31-2011, 05:34 AM   #2
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
ssh server

In a website it was told as..
ssh -vv username@hostname ... for providing verbose information of what my problem is while connecting through ssh server. I got ..

OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
ssh: Could not resolve hostname linux-desktop: Name or service not known

What does this mean? Please do help me..
 
Old 07-31-2011, 05:42 AM   #3
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
DNS not working or you misspelled host name. If you known IP of this host connect by it. Can you post your command line?

Last edited by colucix; 07-31-2011 at 08:26 AM.
 
Old 07-31-2011, 05:44 AM   #4
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
"linux-desktop" is not your hostname. Check it by command:
Code:
hostname
Please do not start the same thread more then once. Edit ealier post.

Last edited by eSelix; 07-31-2011 at 05:50 AM.
 
Old 07-31-2011, 05:51 AM   #5
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
ssh server

Thanks for reply..

linux@linux-laptop:~$ ssh linux@linux-desktop
ssh: Could not resolve hostname linux-desktop: Name or service not known

This is what I get. How to check if DNS is working? How to make it work if it doesnt?
 
Old 07-31-2011, 05:57 AM   #6
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
ssh connection

If I want to connect to other system in remote administration I use ssh command.
ssh username@hostname
In this:
username : other system's username
hostname : other system's hostname
Is this the way I have to do?
 
Old 07-31-2011, 08:28 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Threads have been merged. Please, don't double post: in order to receive more and quick help, it's better to keep discussion in one place. Thanks.
 
Old 07-31-2011, 09:32 AM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,781

Rep: Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772Reputation: 2772
nameservers

If you just want to connect back to your own host, try
ssh username@127.0.0.1
where you replace username with the name of the account you want to land in.

If the machine you want to connect to is NOT your local machine, replace the 127.0.0.1 with the IP address of the target machine.

For more lasting solutions, you might want to ensure that all machines on your local domain are well formed and unique, load up a proper hosts file with their addresses and names, then install and run DNSMASQ. The default configuration will load that hosts file and provide DNS services to resolve those names. Make sure you set it to forward requests it cannot satisfy to your ISP DNS servers. From that point you can set it as a nameserver for itself and all other machines and names will resolve properly on your local network.

Last edited by wpeckham; 07-31-2011 at 09:33 AM.
 
Old 07-31-2011, 01:57 PM   #9
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
ssh

I want to connect to other machine (eg: a.b.c.d with a username of that machine as linux)
ssh linux@a.b.c.d
If I give like this I get as "could not resolve IPaddress a.b.c.d: Name or sever not known"
What should I do in this case?
Is there any installation I must do?
Should I set a publickey and change my port number?
What should I do?
Please do help me...
 
Old 07-31-2011, 03:32 PM   #10
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
This is not a problem with installation, public keys nor port numbers. Please post your real command line not an example, as message is clear - "Name of server is not known".
 
1 members found this post helpful.
Old 07-31-2011, 04:06 PM   #11
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
as eSelix says, please post the actual command you use. This means copy and paste from your terminal into your post.
and enclose it in code tags so it's clear which command you typed and the result it gave.
 
Old 07-31-2011, 04:08 PM   #12
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
also, to debug this problem which seems to be a name resolution issue, please try pinging your machine
Code:
ping ip-of-the-server
ping name-of-the-server
 
Old 08-01-2011, 09:49 AM   #13
kirthika
LQ Newbie
 
Registered: Jul 2011
Posts: 23

Original Poster
Rep: Reputation: Disabled
ssh

linux@linux-laptop:~$ ssh linux@linux-desktop
ssh: Could not resolve hostname linux-desktop: Name or service not known
linux@linux-laptop:~$ ssh linux@59.96.117.135
ssh: connect to host 59.96.117.135 port 22: Connection timed out
linux@linux-laptop:~$

I have copied my terminal as you have asked.
What changes should I do to establish the connection?
 
Old 08-01-2011, 10:10 AM   #14
chandramani_yadav
Member
 
Registered: Jan 2007
Location: Vienna
Distribution: Redhat
Posts: 47

Rep: Reputation: 19
few basic troubleshooting:-
1. check your "/etc/resolv.conf" to see whether it has proper dns server entries.
2. try "telnet remote-host-IP 22" to see whether port 22 (ssh) is running there. if it works then it is problem with your DNS server.
3. try "host remote-host" to see if dns is resolving correctly.
 
Old 08-01-2011, 10:11 AM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,813

Rep: Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958
Is SSH running on 59.96.117.135? To start ssh the command is: sudo /etc/init.d/ssh start
Is a firewall is running on that computer? If so is it configured to allow ssh?
 
  


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
How to set SSH keys on SSH server mansour Linux - Newbie 27 01-16-2011 11:44 AM
Firestarter kills OUTGOING SSH Ubuntu 10.04- rejects SYN/ACK from SSH server edsmithers Linux - Networking 3 09-29-2010 02:53 PM
Using DSL and ssh / ssh-server to access the Windoze desktop GUI On2ndThought Linux - Server 4 11-16-2008 02:17 PM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
Passwordless SSH with SSH commercial server and open ssh cereal83 Linux - General 7 04-18-2006 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:28 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