推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
QQ1685425675
V2EX  ›  Python

在 windows 上 ssh 连接到服务器执行脚本,遇到了问题求助

  •  
  •   QQ1685425675 · Oct 3, 2015 · 2310 views
    This topic created in 4014 days ago, the information mentioned may be changed or developed.
    需求是这样的

    我想写一个 python 3 脚本,可以在 windows 上可以运行,

    我打算用来他 批量部署服务器

    脚本功能如下:
    1.输入远程服务器的 ip 密码 用户名
    2.登陆后,进行初始化操作(替换默认的 apt-get 源, python 源)
    3.生成证书并自动保存到本地( windows 上),并关闭 root 登陆,修改 ssh 端口,启用证书登陆
    4.断开本次登陆,重新用证书登陆
    5.开始部署网站 ...


    本来我打算用 fabric 完成这个功能,我也不知道 fabric 能不能完成,但可惜的是 fabric 不支持 python3 ,所以只好放弃

    所以求助大家, 有什么支持 python3 的 可以通过 ssh 登陆 的第三方库 有吗

    另外 大家对我这个想法 有什么建议吗
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   994 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:40 · PVG 06:40 · LAX 15:40 · JFK 18:40
    ♥ Do have faith in what you're doing.