MAC 配置SSH免密码登录
1.下载安装sshpass
sshpass: 用于非交互的ssh 密码验证ssh登陆不能在命令行中指定密码,
也不能以shell中随处可见的,sshpass 的出现,解决了这一问题。它允许你用 -p 参数指定明文密码,然后直接登录远程服务器。 它支持密码从命令行,文件,环境变量中读取
sshpass下载地址:
http://sourceforge.NET/projects/sshpass/
安装:
tar zxvf sshpass-1.05.tar.gz
cd sshpass-1.05
./configure
make & make install
举个ssh面密码登录的栗子:
[root@fs bin]# sshpass -p 123456 ssh -o StrictHostKeyChecking=no root@192.168.1.15
-p:指定ssh的密码
-o StrictHostKeyChecking=no 避免第一次登录出现公钥检查。也就是避免出现
2.下载shuttle
下载:http://fitztrev.github.io/shuttle/
配置文件修改参考:
{
"_comments":[
"Valid terminals include: 'Terminal.app' or 'iTerm'",
"In the editor value change 'default' to 'nano', 'vi', or another terminal based editor.",
"Hosts will also be read from your ~/.ssh/config or /etc/ssh_config file, if available",
"For more information on how to configure, please see http://fitztrev.github.io/shuttle/"
],
"editor":"default",
"launch_at_login":true,
"terminal":"Terminal.app",
"iTerm_version":"nightly",
"default_theme":"pro",
"open_in":"tab",
"show_ssh_config_hosts":false,
"ssh_config_ignore_hosts":[
],
"ssh_config_ignore_keywords":[
],
"hosts":[
{
"xiaofeng's Servers":[
{
"cmd":"sshpass -p '123456' ssh -o StrictHostKeyChecking=no root@123.123.123.123",
"name":"名称",
"title":"title"
}
]
}
]
}