Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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..
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
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?
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.
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...
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".
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.
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?
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.