pssh-go

pssh

A script to manage ssh/config

Short example

## Variable
$DO_PKEY=~/.ssh/key/do/d1_id_rsa
$VPS_COMMON_OPTION = {
  PubkeyAuthentication yes
  Protocol 2
  ForwardX11 no
}

@@ GITHUB : Every Comment will be conserved;
+---------------+------------------+---------------------------------------+ # This is dummy lines, be ignored.
| github-user1  |  [email protected]  | ~/.ssh/key/github/github_user1_id_rsa | # This comment will be placed before this line.
| github-user2  |  [email protected]  | ~/.ssh/key/github/github_user2_id_rsa |
+---------------+------------------+---------------------------------------+ # This is dummy lines, be ignored.


@@ DO at amsterdam
+-------+---------------------------+------------+
| d1    | [email protected]       | $DO_PKEY   | $VPS_COMMON_OPTION
| d2    | [email protected]       | $DO_PKEY   | $VPS_COMMON_OPTION
+-------+---------------------------+------------+
# Without pkey but with variabled option
+-------+---------------------------+------------+
| d4    | [email protected]       |            | $VPS_COMMON_OPTION
+-------+---------------------------+------------+

+-------+---------------------------+------------+
| d4    | [email protected]       |            | 
          $VPS_COMMON_OPTION
          ForwardX11 yes # .ssh/config format is always avaiable in the place
+-------+---------------------------+------------+

# Usual .ssh/config format is available
Host *
Protocol 2
IdentityFile ~/.ssh/key/id_rsa
ControlMaster auto
ControlPath ~/.ssh/controlmasters/%[email protected]%h:%p
ControlPersist 1h

GitHub

View Github