# sshnopasswd **Repository Path**: loser_coder/sshnopasswd ## Basic Information - **Project Name**: sshnopasswd - **Description**: 通过简单配置,实现多台linux机器无密码连接。 - **Primary Language**: Shell - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 7 - **Created**: 2017-11-22 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #sshnopasswd 主要功能: 更新/etc/hosts,设置无密码连接 使用方法: 1.首先是配置文件 ``` # 输入需要进行无密码连接的所有host [default] hosts = host1 host2 host3 [host1] ip = 10.0.0.2 root_password = 123456 # 需要进行设置的user,每个主机可以指定不同user user = test1 # 密码使用[user]_password这种格式指定 # 设置无密码连接是在列出的所有用户之间,自己和自己也会设置 test1_password = 123456 [host2] ip = 10.0.0.3 root_password = 123456 user = test2 test2_password = 123456 [host3] ip = 10.0.0.4 root_password = 123456 user = test3 test3_password = 123456 ``` 2.配置完后,记得赋予nopsd可执行权限 ``` chmod +x nopsd ./nopsd -h 用法: nopsd [-h|--help|--no-update] -h, --help 打印帮助信息 -n, --no-update 关闭修改/etc/hosts,默认开启 如果执行时有-n或者--no-update命令,就不会更新/etc/hosts ```