I am connected to my university computer using SSH as follows :

sudo ssh [email protected]

However once connected, I'm not able to download any file on the server using wget like this :

server_user@server:~$ wget http://example.com/somefile

If I do that, I get following error:

--2020-07-28 10:14:46--  https://example.com/somefile
Resolving example.com (example.com)... failed: Name or service not known.
wget: unable to resolve host address ‘example.com’

Also I'm not able to install any package using pip on the remote server. How shoud I do these things? Thanks in advance :)

PS : of course the address is not the example.com. I've just used it temporarily here for the example purpose. It is a real http address from which I can download file locally using wget, but doing it on server raises the error reported above.

2 Answers 2


To know the exact problem I'll need more details about the server. But actually it just boils down to a DNS-problem.

Contact the admin of this server and mention that there is a problem with DNS and that resolving the A and AAAA records of example.com fail.

Temporary solution: replace example.com by the IP of the server.
(Running a ping example.com on your computer will show you the ip)

Edit: You mentioned that you also have a problem with installing python modules (with pip). This is because of the same reason, pip will try to download them from a website of which it only knows the hostname and not the ip.

Edit 2: You can also do some research yourself on why resolving fails but i would be careful here !
Some admins like a bit of help from users, others can get really angry when users start snooping around.
When in doubt: don't do it.
Anyway, here are some commands that can provide you more info:

  • dig -t A example.com @ | grep -v '^;' | grep A (should show you the ip of example.com)
  • dig -t A example.com | grep -v '^;' | grep A (should show the same)
  • resolvectl status | grep Server (should show you the dnsservers of your university)
  • systemctl status systemd-resolved (should be active)
  • journalctl -u systemd-resolve (should not contain errors)
  • Depending on what the server is supposed to do, it's also possible it's in a private subnet with a DNS server that only resolves internal domains on purpose. Jul 28, 2020 at 7:07
  • Ulrich Schwarz is certainly correct. But it would suprise me if this the case here. (I am a admin at a university myself. All our servers that regular bachelor students can access with ssh resolve external names)
    – Garo
    Jul 28, 2020 at 7:23

The server has no DNS resolution - perhaps it has intentionally no access to the internet. But you can use scp to upload files to the server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .