前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >It can make your ssh login simply as well as efficiently on Mac or Linux

It can make your ssh login simply as well as efficiently on Mac or Linux

作者头像
AlicFeng
发布2018-08-22 16:20:48
8740
发布2018-08-22 16:20:48
举报

It can make your ssh login simply as well as efficiently on Mac or LInux. 点我翻译 On Mac or Linux system, we are frequently using ssh login remote server by terminal. We will find a headache that is often entering a repetitive command line. Fuck~ it’s a waste of time!Maybe you cloud write configure of alias on profile. enenen~ Finally, I determined to write a time-saving shell.Beginning with university stage.


ssha Tool Characteristics

  • Scalability configuration
  • Automatic interaction login
  • Support password and SecretKeyFile method
  • Support Mac and Linux
  • Saving time

  • Easy to use

help info

代码语言:javascript
复制
➜  ~ ssha -h
usege:
ssha [-h] [-l] [-s <server alias>]

see server list

代码语言:javascript
复制
➜  ~ ssha -l
Index   Description     Port    Host        Username    Password|SecretKeyFile
┌────────────────────────────────────────────────────────────────────────┐
│0       alicfengPC              127.0.0.1       22      alic    pwdalic │
└────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────────┐
│1       us.samego.com           47.68.88.88     22      alic    u.know.pwd      │
└────────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────────┐
│2       hk.samego.com           120.88.88.86    22      alic    u.know.pwd      │
└────────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│3       V**.samego.com          68.120.80.86    22      alic    /home/alic/.ssha/key/V**.samego.com.key │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘

login sameone server

代码语言:javascript
复制
➜  ~ ssha -s 0
┌────────────────────────────────────────┐
│alic logging into the alicfengPC  server│
└────────────────────────────────────────┘
spawn ssh -p 22 alic@127.0.0.1
alic@127.0.0.1's password: 
Welcome to elementary OS 0.4.1 Loki (GNU/Linux 4.13.0-32-generic x86_64)

Last login: Sat Aug 11 16:44:46 2018 from 127.0.0.1
➜  ~ 
successfully logined 【alicfengPC】
➜  ~ 


  • Simply to install

For Mac System

代码语言:javascript
复制
➜  ~ curl -sSL https://raw.githubusercontent.com/alicfeng/sshAutoLogin/master/iMac.sh | bash

For Debian

代码语言:javascript
复制
➜  ~ curl -sSL https://raw.githubusercontent.com/alicfeng/sshAutoLogin/master/iDebian.sh | bash

For Redhats

代码语言:javascript
复制
➜  ~ curl -sSL https://raw.githubusercontent.com/alicfeng/sshAutoLogin/master/Redhats.sh | bash

  • Scalability configuration

example server info configure file

代码语言:javascript
复制
Index=0
Name=hostname
Host=IP | domain
Port=22
User=alic
PasswordOrKey=password

default configure dir

代码语言:javascript
复制
~/.ssha/

configure dir tree

代码语言:javascript
复制
➜  .ssha tree
.
├── 0_localhost.ini
├── 1_47.68.88.88.conf
├── 2_120.88.68.86.ini
└── 3_68.120.80.68.ini

0 directories, 4 files

代码语言:javascript
复制
 ▄▄▄▄▄▄▄▄               ██                                                       ▄▄                            ▄▄▄▄▄▄▄▄                      ▄▄▄▄     
 ██▀▀▀▀▀▀               ▀▀                                                       ██                            ▀▀▀██▀▀▀                      ▀▀██     
 ██        ██▄████▄   ████      ▄████▄   ▀██  ███            ▄▄█████▄  ▄▄█████▄  ██▄████▄   ▄█████▄               ██      ▄████▄    ▄████▄     ██     
 ███████   ██▀   ██     ██     ██▀  ▀██   ██▄ ██             ██▄▄▄▄ ▀  ██▄▄▄▄ ▀  ██▀   ██   ▀ ▄▄▄██               ██     ██▀  ▀██  ██▀  ▀██    ██     
 ██        ██    ██     ██     ██    ██    ████▀              ▀▀▀▀██▄   ▀▀▀▀██▄  ██    ██  ▄██▀▀▀██               ██     ██    ██  ██    ██    ██     
 ██▄▄▄▄▄▄  ██    ██     ██     ▀██▄▄██▀     ███              █▄▄▄▄▄██  █▄▄▄▄▄██  ██    ██  ██▄▄▄███               ██     ▀██▄▄██▀  ▀██▄▄██▀    ██▄▄▄  
 ▀▀▀▀▀▀▀▀  ▀▀    ▀▀     ██       ▀▀▀▀       ██                ▀▀▀▀▀▀    ▀▀▀▀▀▀   ▀▀    ▀▀   ▀▀▀▀ ▀▀               ▀▀       ▀▀▀▀      ▀▀▀▀       ▀▀▀▀  
                     ████▀                ███                                                                                                         


AlicFeng say : 价值源于技术,贡献源于分享

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018.08.11 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档