In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today Xiaobian to share with you how to configure PyCharm SSH and SFTP to connect to the remote server related knowledge points, detailed content, clear logic, I believe that most people still know too much about this knowledge, so share this article for your reference, I hope you will learn something after reading this article, let's take a look at it.
Brief introduction
SSH,Secure Shell, secure shell protocol for telnet sessions
SFTP,Secret File Transfer Protocol, secure file transfer protocol for synchronizing files
Windows connects to a remote server for Python development in Linux environment, which requires the combination of SSH and SFTP
Installation
Install PyCharm Professional
PyCharm Community does not have this option and cannot configure SSH Interpreter
Log in to the remote server
Ssh user@host [- p port]
Check whether the SSH service is enabled
Service sshd status
If Loaded: not-found (Reason: No such file or directory) or sshd: unrecognized service is displayed, you need to install
Sudo apt-get install openssh-server
If Active: inactive (dead) is displayed, you need to start
Sudo / etc/init.d/ssh restart
As long as the SSHD service is started, SFTP can use
Tools → Deployment → Configuration...
+ → SFTP → New server name fill in (e.g. user@host:port) → uncheck Visible only for this project → SSH configuration → + → fill in → Test Connection according to SSH information
SFTP, here, Test Connection → Autodetect.
File → Settings → Project: xxx → Python Interpreter → sets up → Add... → SSH Interpreter → Existing server configuration
Configure the Python interpreter and synchronize folders. Check whether to use sudo permissions depending on the situation.
The first try
Main.py
Print (_ _ file__)
Manual synchronization may be required: Tools → Deployment → Upload to …
Shortcut key: Ctrl + Alt + Shift + X
The pit encountered
1. EOF while reading packet
Need to start the SSHD service
2. Sudo: unable to resolve host xxx: No such file or directory
Sudo vim / etc/hosts
Add
127.0.0.1 localhost xxx
3. Vim / etc/hosts error "/ etc/hosts" E166: Can't open linked file for writing
View real path
Readlink / etc/hosts
Or delete the file.
4. Can't get remote credentials for deployment server xxx@xxx:xx password
If you don't fill in the password of sudo, you can reconfigure it and directly SSH Interpreter → New server configuration.
These are all the contents of the article "how to configure SSH and SFTP to connect to a remote server in PyCharm". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.