Here is what I am trying to do. I have a Windows VM and another Linux VM which is used as server. I have Spyder installed on my Windows VM and would like to run my Python code in Spyder on remote Linux server.
I did try using option in Spyder called "Connect to remote kernel" but it did not work and I am getting error "Could not open ssh tunnel ; Paramiko not available". I was using username#servername:22 for making ssh connection. Needless to say, I am able to ssh the machine using putty but not using Spyder. Any ideas how should I fix this?
I found another way to make a connection to an external server, here is the link explaining step by step.
Basically, you have to connect your client PC to the server through a PuTTY SSH tunnel, it will allow to redirect the client ports to the correct ipython kernel server ports.
Related
Connection problem solved! Leaving for others who may have issue.
Still having problems with bind-address issues
I will state the problem, the loayout context of my system and things I have tried.
Problem: When trying to use mysql connector in a python file i keep getting access denied. I am using Pycharm as my IDE and I have the Mysql connector installed though that.
So I am running Ubuntu Server on a Orale VM on a Windows 10 desktop, it's a bridged connection and I can SSH in from my laptop (LInux Mint)to the server just fine. I am running the program trying to access the DB on the Linux Mint laptop. Local network only using 192.168.0.xxx protocols. All VPN's disabled at this point for now.
So just to state i reinstalled the server last night and I set up fresh users and DB for the user and even granted ALL PRIVILEGES to the user and connections from my connectiong machines.
i set bind address in my mysqld.cnf file to 0.0.0.0 for now.
(when i had it set to my laptop ip it wouldn't bind and would restart until I switched it back)
UFW is set to allow mysql(3306)
Ask all the questions and I will get you answers asap. Please provide commands for me to run if needed and specify if the should be ran on the server or my laptop. Thanks for reading!
I wonder if there is any way to coding python with remote server data and run the python script on remote server with pycharm only installed on my local machine?
The remote server can be access by two ip address (ssh and ftp each), id and password.
But when I try to use pycharm professional project interpreter, there always an error like this (the ip address I used is for ssh):
I know the easiest way is install jupyter notebbok on my remote server, but I don't have permission to do that.
I installed a web server on a remote machine that can be only access through a ssh tunnel. Therefore, I have run with putty a ssh tunnel by specifying a port forwarding (in my case 8159). I have also configured the socks proxy on my browser to access to my remote webserver. Futhermore, with a curl command I can get the webpages if I add the following option --sock5-hostname localhost:8159.
Now, I would like to use python to request those webpages by passing through the ssh tunnel that I have configured with putty. I tried pysocks and proxy environment variables in my python code but it did not work. I would like to know if you have an idea to solve this problem.
Thank you in advance.
I have made a connection between my openssh client and server. Both sides are window machine. I fail to do the followings:
Enter the python command line interface on my SSH client side, which can be done by entering "python" directly through a command line.
I want to run a python script on a server side by calling it on my client side. This script calls a commercial library to download data from a commercial database.
I can do both perfectly through remote desktop on the server side, but when I use openssh to connect, all fail. Any way to solve, especially item (2)?
If Python is installed on the remote server as C:\Python27 and the script is C:\Foo\bar.py, then get PuTTY. It contains the program plink.exe which can execute remote commands.
The command for you should be
plink.exe user#remote C:\Python27\python C:\Foo\bar.py
as explained in http://the.earth.li/~sgtatham/putty/0.64/htmldoc/Chapter7.html#plink-usage
I am trying to connect to a Linux box using paramiko and from that session execute an ssh session to establish a reverse tunnel to another machine.
Using keyfiles works fine, but it's not an actual option, and connecting to the other box to establish the connection manually also won't be possible.
I am able to connect to the machine and execute non-interactive commands, and have been successful in executing interactive commands as well. I am however unable to "trick" ssh into working interactively this way, by using the example found here
Any feedback will be appreciated.