V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2015-10-03 18:55:01 +08:00 · 1761 次点击
    这是一个创建于 3138 天前的主题,其中的信息可能已经有所发展或是发生改变。
    需求是这样的

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

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

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


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

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

    另外 大家对我这个想法 有什么建议吗
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2626 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 15:47 · PVG 23:47 · LAX 08:47 · JFK 11:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.