Dynamic application-level port forwarding with SOCKS using paramiko library in python
I'm trying to connect to SSH server in the following way:
sock = socks.socksocket()
sock.setproxy(socks.PROXY_TYPE_SOCKS5, 'localhost', 22, True)
sock.connect((**IP address of SSH server**, 22))
t = paramiko.Transport(sock)
t.connect( None, 'username', 'password')
And get the following error
> Traceback (most recent call last): ...
> sock.connect((**IP address of SSH server**, 22)) File "C:\Python27\lib\site-packages\socks.py", line 368, in connect
> _orgsocket.connect(self,(self.__proxy,portnum)) File "C:\Python27\lib\socket.py", line 224, in meth
> return getattr(self._sock,name)(*args) socket.error: [Errno 10061] No connection could be made because the target machi ne actively
> refused it
My goal is to simulate Putty's way in creating SSH SOCKS Proxy as here: Configure PuTTY To Create SSH SOCKS Proxy For Secure Browsing. Or equivalent
ssh -D [localhost]port
for local dynamic application-level port forwarding.
Can someone explain, please, what's wrong and how to do it the right way using paramiko? Thanks.
P.S. I've found this http://stackoverflow.com/a/5823383/1264304 However, I don't succeed to implement it. Someone?
i want to create a proxy server or (Socks host ??) to communicate with browsers (such as firefox) to forward http proxy. i have a software that do this: bitvise tunnelier. so, i need to write an appli
I want using proxy/socks throw ssh server and i found nice example from here How do you proxy though a server using ssh (socks…) using php’s CURL? but example don't work, here is my code. <?php $co
Are there any examples of initiating an SSH session to a remote machine with port forwarding options from within Twisted using Conch such that one can pipe normal TCP traffic through the tunnel? Scena
I want to install paramiko on win 7 32bit ,the python is 3.3 . I can compile it，but get follow errors: Installed c:\python33\lib\site-packages\paramiko-1.8.0-py3.3.egg Processing dependencies for para
I want to send a message between two java applications that are both behind different firewalls. Is there a way to do this without port forwarding?(for example p2p, what is skype doing?)
I'm developing a client-server game in python and I want to know more about port forwarding. What I'm doing for instance is going to my router (192.168.0.1) and configure it to allow request for my re
# sshpy v1 by s0urd # simple ssh client # irc.gonullyourself.org 6667 #code import paramiko import os ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) privatekey =
This is an example which works fine on friend's computer: import paramiko host = 188.8.131.52 port = 222 username = stackoverflow password = e2fghK3 transport = paramiko.Transport((host, port)
I'm using the Paramiko library to run a ssh command between two servers. My Master server is a Fedora 18 box, and my Slave is a Windows 7 machine. In other to run a ssh server in the Windows 7 mac
Due to firewall restriction, I have to share the 80/tcp port on a machine. I try to achieve this : - Python script (or xinetd using a python script) listening on port 80 - Custom (binary language) s
I'm trying simple port forwarding with VirtualBox and it appears VirtualBox.exe is listening on the host to the port, but not actually forwarding the connection to the guest. I've tried on multiple po
I am using System.Linq.Dynamic library for generating dynamic where condition on IQueryable collection. Can anyone list the list of operation supported by this library? I do only know = and Contains.
I'm developing my first Django application, I have installed allauth to permit openid login. I'm trying to use no-ip dns to avoid the problem of the dynamic ip, for register my app on facebook and tes
i'm trying and, so far, failing to use python asyncio to access a serial port. i'd really appreciate any tips on using the new python async framework on a simple fd. Cheers! James
I created a simple web app using django and was wondering if there is any python library out there that could help me integrate my app with facebook. Thanks!
I am using two commands in paramiko python module find and scp. Find command is working fine and giving the correct output but scp is not giving any output. I tried with following code: import par
I have a socks4 server that I use to proxy requests from different kinds of applications (http, ftp, etc..) to their destination. I know that socks4 does not define a way for applications to authentic
I have a play application running on port 8080. I currently forward to this by using http://ip_address:8080 as my 'URL to forward to' in my forwarding service control panel. The problem with this is
This question is sort of the opposite of this: http://stackoverflow.com/questions/2317849/how-can-i-use-a-socks-4-5-proxy-with-urllib2 Let's say I use a SOCKS 5 proxy using the method accepted in tha
I am trying to learn method swizzling. I have created a program in objective C which just calls a method within its class. Now my I am trying to load a dynamic library using DYLD_INSERT_LIBRARIES so I
I am trying to link a dynamic library in my COCOA application but I am getting the following strange error: dyld: Library not loaded: /opt/local/lib/libusb-0.1.4.dylib I want to link this library from
I'm getting a general Indy error when using the IdHTTP client component in conjunction with a SOCKS5 proxy server and using SSL. If I use the IdHTTP component with my SOCKS5 proxy (and a non https UR
import paramiko client = paramiko.SSHClient() client.load_system_host_keys() ip = '192.168.100.6' client.connect(ip, username='root', password='mima') i, o, e = client.exec_command('apt-get install sl
I have built an application called Tun2Socks GUI. It's program to make Socks proxy o be transparent. Usually it use SSH port forward or TOR as SOCKS service, but I want it can use HTTP proxy too. So I
Does someone have a simple example on how to add a port forwarding entry with upnp into the router using c++?
I'm using a vagrant Geodjango box and port forwarding is not working for me. On the box, I have run: python manage.py runserver 0.0.0.0:8000 But http://localhost:8000 and http://localhost:4567 both
I've installed and written the following Paramiko which is unable to put the file. It is easily able to 'get' a file and execute 'ls' commands on it. #set username & password username='runaway' pa
I need to read the serial port from windows, using either Python or C++. What API/Library should I use? Can you direct me to a tutorial? Thanks!
If I use command ssh -f server 'cp /file1 /file2 & >/dev/null 2>/dev/null ; disown;' it detaches well and command is runned in the background. But is there any variant of -f key for paramiko
I'm looking for a way to connect to my remote server using ssh binding inside my java application. I enter the command like below inside my terminal to connect my server: ssh -D 1234 email@example.com
I'm writing a python script which uses an external library (paramiko). If I'm to release the package how do I package paramiko also? Is there anyway I can give it as we can give dependencies in java a
I am looking for a way of putting non-printable characters in a string in python. Small background information: I am working with windows command prompt over SSH using paramiko. however paramiko does
Test Function def GetTestFile(): sshConn = paramiko.SSHClient() sshConn.load_system_host_keys() sshConn.connect(host, port, usrnm, pwrd) (connin, out, err) = sshObj.exec_command(cat test.txt) print
I'm currently developing an Match Maker for a game called GTA, the problem is that the game server uses 7777 port and I need to open this port to the world to allow players to join in the server, and
I'm trying to use Paramiko to connect to an SSH server from Python. This is what I tried so far: >>> import paramiko >>> import os >>> privatekeyfile = os.path.expanduser('~
guys! I'm looking for pure python implementation of jpeg writing (reading will be nice, but not necessary) library. I've founded only TonyJPEG library port at http://mail.python.org/pipermail/image-si
ok so using paramiko im trying to upload a file using ssh (i already got that working) no i need to send a text command to execute the file i upload. i need to execute the command in the location of o
I am having some problems with commands that have sudo using paramiko f.ex sudo apt-get update here is my code: try: import paramiko except: try: import paramiko except: print There was an error wit
Sorry because of this dumb question but I didn't quite find an answer. So for TCP only the server needs a port forwarding, but not the client. But since UDP doesn't technically differentiates between
I am using python's library from Blender v.2.69, and I was wondering if I can modify an STL file via command line, I'm thinking to add simple solid like a cube or something. http://www.blender.org/do
I am using Fedora 20 after running this command: sysctl -w net.inet.ip.forwarding=1 it is giving this error: sysctl: cannot stat /proc/sys/net/inet/ip/forwarding: No such file or directory
I want to make an app using Qt that communicates with serial port. The problem is that I cant find a library that works and does this thing. I need a non General Public License library I think. Actua
I am developing a dynamic mail forwarding component for a website. The concept is that - a user will send an email with arbitrary content to a special email address on the server - based on the to a
I want to develop a code in python which will open a port in the localhost and will send the logs to that port. Logs will be nothing but the command output of a python file. like : hello.py i = 0 whil
I installed kvm and set several guests on a server using vmbuilder. Here is the following configuration : server host1 (xxx.xxx.xxx.xxx) -> guest vm1 (192.168.122.203) -> guest vm2 (192.168.122.
Any way to test OAuth integration to google without having to have a port forwarding rule in my router back to my development Mac? Background: Developing Ruby on Rails web app that will request data
I installed python, pip and easy_install on my computer. and with pip command installed spynner but i've got an error with autopy installation, but i solved it by using easy_install and after installa
Is you're building a distributed architecture with various services, is it acceptable to have those services communicate via ssh port forwarding, so that to a client a service looks like it's being se
I have a python server that listens on a couple sockets. At startup, I try to connect to these sockets before listening, so I can be sure that nothing else is already using that port. This adds about
I've just tried to connect my Python/Django app with Vyatta server using Paramiko for SSHing. Unfortunately, when I try to run show interfaces it throws Invalid command. However, if try to SSH manua