Emulating SSH's SOCKS Proxy Tunnel in Python

ⅰ亾dé卋堺 提交于 2019-12-12 09:06:03

问题


I used to create a SOCKS connection between a windows client and linux server using SSH server and putty. However, the firewall between the client and server is now able to identify SSH packets and drop them.

I was wondering if I can emulate such behavior of SSH tunnels using python? Any recommendations on libraries or readings?

Thanks in advance.


回答1:


Yes, yes you can. Pick your poison.

  • http://socksipy.sourceforge.net/
  • http://sourceforge.net/projects/pysocks/
  • http://code.google.com/p/socksipy-branch/
  • How can I use a SOCKS 4/5 proxy with urllib2?
  • http://google-api-python-client.googlecode.com/hg/docs/httplib2.socks.html



回答2:


You can consider using paramiko for your SSH. Here is a nice link ssh-programming-with-paramiko

You can also try this ssh module which uses paramiko.



来源:https://stackoverflow.com/questions/8997142/emulating-sshs-socks-proxy-tunnel-in-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!