Connect to your machine through SSH using Python

Source: Internet
Author: User

It's time to write python code. I love automation. Today, I will show you how to connect to your machine through ssh using python and run commands on it. This is not difficult, but it is not very easy to use python, because many modules and libraries are used to complete this task. Are you curious about what modules will be used in this tutorial?

We will use the pxssh class of the pexpect module in Python to handle automation requirements, such as ssh and ftp. Do you want to make your system management life as simple as possible? So please follow this tutorial and try to learn as much as possible. OK, OK. Here, I will give some simple descriptions about pxssh. You can also import pxssh In the python Interactive shell and type help (pxssh) to get

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.