python ssh登陆模块_Python sshh包_程序模块 - PyPI - Python中文网
sshh是一個ssh幫助工具,用于在ssh代理中批量注冊ssh私鑰。
sshh的主要目的是避免在
在ssh代理中注冊的密鑰數超過一定數量。當
當服務器設置私鑰上限時,超過了密鑰嘗試的上限
嚴格的嘗試。
通過清除ssh代理中注冊的所有密鑰并注冊
如有必要,或每次輸入密碼短語。但是,在這種情況下
是多個密鑰和服務器,ssh連接可能非常麻煩。sshh使用python的
子進程包以啟動新的ssh代理,并進一步調用ssh add來集體注冊
盡可能多的私鑰。這使你免去了麻煩。
用法
初始值(.venv) $ sshh-config init
Enter password for your registry: xxxxx
The registry file ~/.sshh.registry is created.
更改密碼(.venv) $ sshh-config chpw
Enter CURRENT password for your registry: xxxxx
Enter NEW password for your registry: yyyyy
Enter NEW password again for verification: yyyyy
Password has been changed.
注冊鍵(.venv) $ sshh-add -g prod ~/id_rsa_server1
Enter password for your registry: xxxxx
Enter passphrase for the keyfile: yyyyy
The keyfile is registered.
列表鍵(.venv) $ sshh-add -l
Enter password for your registry: xxxxx
[prod]
/home/user/.ssh/id_rsa_server1
/home/user/.ssh/id_rsa_server2
[stg]
/home/user/.ssh/id_rsa_server7
/home/user/.ssh/id_rsa_server8
調用ssh代理(venv) $ sshh-agent -g prod
Enter password for your registry: xxxxx
Enter password for your registry:
Registering keys for session "prod"
ssh-agent PID=67779 session "prod" has been started. To close this session, exit shell.
[prod] (venv) $
[prod] (venv) $ exit
exit
ssh-agent PID=67779 session "prod" has been closed.
(venv) $
歡迎加入QQ群-->: 979659372
推薦PyPI第三方庫
總結
以上是生活随笔為你收集整理的python ssh登陆模块_Python sshh包_程序模块 - PyPI - Python中文网的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 编写五子棋程序时如何添加下棋时的音效_干
- 下一篇: python竞赛题解答_【一点资讯】用p