0

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?

2
  • 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, 2010 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, 2010 at 5:21

1 Answer 1

1

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)

You must log in to answer this question.

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