Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have recently shifted from behind the proxy to direct connection settings. I removed http_proxy and now my apt-get update and upgrade works fine but somehow I am not able o connect to internet through the shell (python urllib2 or wget) Any ideas as to what settings are missing?

share|improve this question
There is no such term as "connect to internet", I suggest you to be more specific, otherwise your question doesn't make much sense. wget/urllib2 usually mean HTTP (or FTP), so a first step would be to state if the problem occurs for all sites or only to particular ones. Another general advice would be to check if DNS resolving is ok. With broken DNS resolving it's still possible to connect via IP address. – vtest Jul 8 '10 at 8:05
Exact problem is: I can apt-get update and upgrade from the shell but I cannot ssh to my domain from the shell. How can I fix this? – zubinmehta Jul 12 '10 at 5:21
up vote 1 down vote accepted

you could run ssh -vvv on terminal to see what happen when ssh make connection to your server. Sometimes, urllib2 just works with remote site when you add http header and other data to you code like this:

user_agent = 'Mozilla/4.0(compatible; MSIE 5.5; Windows NT)' 
headers = {'User-Agent':user_agent}  
value = {}  
data = urlencode(value)
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.