将临时ssh访问权限授予受信任的个人..
fssh的Python项目详细描述
fssh
Grant temporary SSH access to a trusted individual.
先决条件
- Python3
- requirements.txt
安装
- Linux
# Go to the directory where you want the fssh folder to be (e.g. 'cd ~/git/') git clone https://github.com/runarsf/fssh.git cd fssh chmod +x fssh.py
- 点
Coming soon (tm) python3 -m pip install f-ssh
用法
./fssh.py --help # or python3 fssh.py --help # or python fssh.py --help
示例
- GitHub用户
./fssh.py -r -u runarsf
- 公钥作为参数
./fssh.py -r -k "publicPartOfSSHKeypair"
- 公钥作为文件
./fssh.py -r -k /path/to/file/id_rsa.pub
- 多个用户
- 如果指向一个文件,还可以添加多个ssh密钥。
./fssh.py -r -u runarsf -k "publicPartOfSSHKeypairOrFilePath"
工作原理
fssh从open github api获取ssh密钥对的公共部分,并将其添加到~/.ssh/known_hosts
。当脚本终止时,它会将已知的主机文件还原到以前的状态。备份文件存储在~/.ssh/known_hosts_fssh
。脚本运行时对已知主机文件所做的任何更改都将在脚本终止时丢弃。
当脚本终止时,连接的用户将not失去与计算机的连接,但他们将无法重新连接。
fssh © runarsf · Author and maintainer.
Released under the GPLv3 License.