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.
Related
I am learning how to create ansible modules in python, I want to connect to remote devices, I am looking at ansible source code to see how they connect, but I still cant understand how???
I took this simple module file from ansible to check how they connect to the remote device and do all the stuff that the module does
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/ping.py
I don't see any socket or libraries for ssh in this file, so how does it happed?
does ansible first connect to the remote host and then activate the module on the remote host?
is that why it requires python on remote devices?
I cant really understand it
As far as i know, Ansible use ssh to connect.
You can perform a research whith 'repo:ansible/ansible filename:ssh' in
github research here
You can examin this code.
Ansible also use the lib paramiko to connect with ssh.
as we can see here
I wonder and i've been trying everything to get my program with python sockets to work remotely. When I say remotely is like, I run the server in my computer and my friend at his house can run the client and connect to my server. Is this possible without using Hamachi? Pls let me know, because I'm already dying by trying so many things and installing and uninstalling programs.
You have to activate port forwarding on your router so that everything that comes on the specific port is forwarded to your local IP (and the port should be open).
I have a python script on a remote server. I would like to run it on the remote server itself. However, PyCharm is not installed on the remote server and I need PyCharm to debug the code.
I have PyCharm on my local computer and I would like to run the script (which is on remote server) on the remote server using PyCharm on my local machine. I am aware of Deployment tools and remote server host in PyCharm. I do not know how to make them work together.
Having the script on my local computer is not really an option for me as there are huge data files involved with the code and I have very limited storage on my laptop.
I'm not sure if it's absolutely necessary to use Pycharm only for debugging on your remote server but if not, you can use pdb module for debugging too: https://docs.python.org/2/library/pdb.html
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.
So I have a RedHat System in AWS running Spark on top of HDFS. Now I want to access PySpark from my local machine i.e. Interactive Python.
So, I installed Spyder-Py2 to connect to the remote AWS machine so I can access Spyder Python.
Route:
Using Cookbook: Connecting to a remote kernel via ssh, I started Kernel on AWS machine i.e. Server and copied the json file over to local machine.
Changed the ip in kernel1234.json to point to the public ip.
Went to Consoles in Spyder-Py2 and select "Connect to existing kernel".
Passed the kernel1234.json file, added username and host in the hostname section.
Passed my AWS pem key in SSH Key section and entered the password
But it fails with the below error:
Unable to connect to IPython kernel-1234.json
Can anybody please tell me what am I missing here ?
Note: The server on the AWS VM is still running.