Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new do Fedora and when ever I install the operating systems I am never able to ssh. Whenever I do something like ssh [email][/email] , I get this error Could not resolve hostname Name or service not known. I'm able to do 'host' and do 'ping' Both respond as you would expect with the ip.

share|improve this question
Can you please post the output of ssh -v and the full command you are trying to try? – Pratik Amin May 21 '11 at 2:04
[anarr@localhost ~]$ ssh -v OpenSSH_5.6p1, OpenSSL 1.0.0d-fips 8 Feb 2011 usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-L [bind_address:]port:host:hostport] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-R [bind_address:]port:host:hostport] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] [user@]hostname [command] – Antarr Byrd May 21 '11 at 2:09
[anarr@localhost ~]$ ssh ssh: Could not resolve hostname Name or service not known [anarr@localhost ~]$ – Antarr Byrd May 21 '11 at 2:09
can you show us the output of iptables -L? pretty weird if you can ping the hosts (and it responds) but you can't access it.. – boris quiroz May 21 '11 at 4:52
Also, can you please post the line from /etc/nsswitch.conf that starts with hosts, plus the current content of /etc/hosts – wolfgangsz May 21 '11 at 10:49

Your ssh may try to resolve IP6 and time out doing this. If you are not using IP6 try disabling IP6 in /etc/ssh/ssh_config by changing AddressFamily from 'any' to 'inet'.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.