程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python easily makes an SSH login

編輯:Python

One 、 Preface

mention ssh, We can't help thinking xshell This famous tool , as well as Linux System , because ssh It's usually Linux Remote connection service established in , and windows Medium telnet More similar , Are used for remote connection , We can do it in Linux Create one easily in ssh service , And then our Linux If the server is open to the public, it can be easily accessed by others , But it's made up here Linux The server is not open to the public , So just test locally , First we set up ssh service , Pictured :


This means that you have created ssh service .


Two 、  install ssh Connection tool

Because there are so many things to install , So here is a small series for you to download , You only need to execute one line of command to install , Download address :

 https://url25.ctfile.com/f/34512525-543647348-3a6733

( Unlock :7054)  Download it and go directly through setup.py To install , The order is :



python setup.py build

python setup.py install
  • 1.
  • 2.

Execute in sequence to install , After the installation, we need to use the command to open a tornado The server , as follows :


python3 main.py

  • 1.

Because I use Linux System , and Linux The default installation of the system is python2.7 And will only python2.7 Add to environment variable , So in order to be in python3 Run in , I can only go to python3 The installation package of , The above is executed in the installation package . After execution, the listening port will start to be 8888 Local server for , Pictured :


At this point, we can access the address , The visiting address is :http://localhost:8888, Pictured :


At this point, we need to enter host, User name and password ma that will do ,host Is the intranet address of this computer , This use ifconfig You can view it , User name and password ma That is, the user name and password used for system login ma. After filling in, you can enter ssh The connection interface of , At this point, the machine can be operated , Pictured :




3、 ... and 、 summary

This tool can be said to be xshell Simplified version of , Although the current function is not very perfect , But that's enough .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved