码迷,mamicode.com
首页 > 系统相关 > 详细

mac 安装brew mac安装expect mac一键登录服务器脚本

时间:2019-05-16 15:16:04      阅读:2635      评论:0      收藏:0      [点我收藏+]

标签:strong   class   脚本   ssl https   font   需要   3.0   一键   服务器   

mac 安装brew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

mac安装expect(需要先安装brew,没有安装的话看上边)

brew install expect

 

mac一键登录服务器脚本

 

set user "zhaohh"

set host "123.126.105.34"

set password "haizhi1234!"

set timeout -1

 

spawn ssh $user@$host

expect "*assword:*"

send "$password\r"

interact

expect eof

mac 安装brew mac安装expect mac一键登录服务器脚本

标签:strong   class   脚本   ssl https   font   需要   3.0   一键   服务器   

原文地址:https://www.cnblogs.com/zhaohuanhuan/p/10875657.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!