跳板机登录指南

步骤1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
#安装Homebrew
步骤2
brew install keychain
#安装keychain
步骤3
ls -al ~/.ssh
# 查看目录下已经存在的ssh key如果存在则跳过步骤4
步骤4
ssh-keygen -t rsa -C "your_email_address"
# 生成ssh key
Generating public/private rsa key pair.
Enter file in which to save the key (/your_home_path/.ssh/id_rsa):回车键
Enter passphrase (empty for no passphrase): 回车键
Enter same passphrase again: 回车键
Your identification has been saved in /your_home_path/.ssh/id_rsa.
Your public key has been saved in /your_home_path/.ssh/id_rsa.pub.
步骤5
cat ~/.ssh/id_rsa.pub
终端展示如下格式内容:
ssh-rsa AAAAB3NzaC1y... your_email_address
步骤6
将上面的字符串拷贝到公司内部网址的key中
步骤7
将  eval `keychain --eval id_rsa`加入到~/.bash_profile文件中
步骤8
完成以上步骤,就可以在申请服务器帐号和跳板机帐号
步骤9
接下来就可以登入跳板机:ssh -A '用户名'@login1.qima-inc.com
步骤10
ssh 对应机器
#从跳板机登录到 对应机器(线上机器) 
posted on 2018-07-18 15:58  我&菜鸟  阅读(5431)  评论(0)    收藏  举报