Login
Immutable PageDiscussionInfoAttachments
Diff for "maccha/ssh_config"

MMA
Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2021-04-21 22:48:04
Size: 1035
Editor: maccha
Comment:
Revision 6 as of 2021-10-06 23:58:44
Size: 2765
Editor: maccha
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#acl maccha:admin,read,write,delete,revert, Known:read All:read
Line 2: Line 4:
# setting
Line 4: Line 7:
PreferredAuthentications publickey #PreferredAuthentications publickey
Line 7: Line 10:
Match host sunrise,saga,atlas
  ProxyJump nest
  User maccha
# UEC
Host sol
  Hostname sol.edu.cc.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/id_rsa_sol

## ssh tunnel of sol (Port Fowarding, Local Forward)
#> ssh sol.edu.cc.uec.ac.jp -L 8080:proxy.uec.ac.jp:8080 -l k1910192
Host soltnl
  Hostname sol.edu.cc.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/id_rsa_sol
  LocalForward 8080 proxy.uec.ac.jp:8080
Line 12: Line 25:
Host sol
  HostName sol.edu.cc.uec.ac.jp
  User hoge
  IdentityFile ~/.ssh/id_rsa_sol
# IED
Line 18: Line 27:
  HostName remote.ied.inf.uec.ac.jp
  User hoge
  Hostname remote.ied.inf.uec.ac.jp
  User k1910192
Line 22: Line 31:
Host sol2ied
  HostName sol.edu.cc.uec.ac.jp
  User hoge
  LocalForward 5901 localhost:5901
  IdentityFile ~/.ssh/id_rsa_sol

Host vncied
  HostName b57.ied.inf.uec.ac.jp
  User hoge
  LocalForward 5901 b57.ied.inf.uec.ac.jp:5901
## vnc
# remote desktop, IED machine
# Portforwarding, LocalForward
# (localhost:5901) <--- (sol XOR ied) ---> (bXX.ied.inf.uec.ac.jp:5901)
#> ssh sol -L 5901:bXX.ied.inf.uec.ac.jp:5901 && ssh bXX.ied.inf.uec.ac.jp
Host iedvnc
  Hostname bXX.ied.inf.uec.ac.jp
  User k1910192
Line 33: Line 40:
  ProxyCommand ssh -CW %h:%p sol2ied   #ProxyJump sol
  ProxyJump ied
  LocalForward 5901 bXX.ied.inf.uec.ac.jp:5901
Line 36: Line 45:
# sol reachable servers # MMA
Match Host atlas,hime,saga
  ProxyJump nest
Line 38: Line 50:
  HostName nest.mma.club.uec.ac.jp   Hostname nest.mma.club.uec.ac.jp
Line 43: Line 55:
# nest reachable servers
Line 45: Line 56:
  HostName sunrise   Hostname sunrise.mma.club.uec.ac.jp
  User maccha
  IdentityFile ~/.ssh/id_rsa_sunrise
  ProxyJump sol

Host moon
  Hostname moon.mma.club.uec.ac.jp
  User maccha
  IdentityFile ~/.ssh/id_rsa_moon
  ProxyJump sol

Host atlas
  User maccha
  IdentityFile ~/.ssh/id_rsa_atlas

Host hime
  User maccha
  IdentityFile ~/.ssh/id_rsa_hime
Line 48: Line 76:
  HostName saga

Host atlas
  HostName atlas
  User maccha
  IdentityFile ~/.ssh/id_rsa_saga
Line 55: Line 81:
  User git
Line 56: Line 83:
  User git
Line 59: Line 85:

== 参考 ==
=== MMA ===
他の方がどのように設定しているか、参考にした。

 * [[../../shosato/ssh_config|shosato/ssh_config]]
 * [[../../akky/ssh_config|akky/ssh_config]]

=== 外部 ===
ポートフォワーディングについて

 * [[https://www2.filewo.net/wordpress/2019/03/31/%e3%80%90%e6%94%b9%e8%a8%82%e7%89%88%e3%80%91ssh%e3%83%9d%e3%83%bc%e3%83%88%e3%83%95%e3%82%a9%e3%83%af%e3%83%bc%e3%83%89%ef%bc%88ssh%e3%83%88%e3%83%b3%e3%83%8d%e3%83%ab%ef%bc%89%e3%80%90%e3%83%ad/|【改訂版】SSHポートフォワード(SSHトンネル)【ローカル・リモート・ダイナミック総集編】]]

ssh_configの記法を知った。

 * [[https://man.openbsd.org/ssh_config|ssh_config(5) - OpenBSD manual pages]]
 * [[http://www.koganemaru.co.jp/cgi-bin/mroff.cgi?sect=5&cmd=&lc=1&subdir=man&dir=jpman-11.2.2%2Fman&subdir=man&man=ssh_config|On-line Manual of "ssh_config"]]
 * [[https://nxmnpg.lemoda.net/ja/5/ssh_config|ssh_config(5) manページ]]

# setting
ForwardAgent yes
ServerAliveInterval 60
#PreferredAuthentications publickey


# UEC
Host sol
  Hostname sol.edu.cc.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/id_rsa_sol

## ssh tunnel of sol (Port Fowarding, Local Forward)
#> ssh sol.edu.cc.uec.ac.jp -L 8080:proxy.uec.ac.jp:8080 -l k1910192
Host soltnl
  Hostname sol.edu.cc.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/id_rsa_sol
  LocalForward 8080 proxy.uec.ac.jp:8080


# IED
Host ied
  Hostname remote.ied.inf.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/ied_id_rsa

## vnc
# remote desktop, IED machine
# Portforwarding, LocalForward
# (localhost:5901) <--- (sol XOR ied) ---> (bXX.ied.inf.uec.ac.jp:5901)
#> ssh sol -L 5901:bXX.ied.inf.uec.ac.jp:5901 && ssh bXX.ied.inf.uec.ac.jp
Host iedvnc
  Hostname bXX.ied.inf.uec.ac.jp
  User k1910192
  IdentityFile ~/.ssh/ied_id_rsa
  #ProxyJump sol
  ProxyJump ied
  LocalForward 5901 bXX.ied.inf.uec.ac.jp:5901


# MMA
Match Host atlas,hime,saga
  ProxyJump nest

Host nest
  Hostname nest.mma.club.uec.ac.jp
  User maccha
  IdentityFile ~/.ssh/id_rsa_nest
  ProxyJump sol

Host sunrise
  Hostname sunrise.mma.club.uec.ac.jp
  User maccha
  IdentityFile ~/.ssh/id_rsa_sunrise
  ProxyJump sol

Host moon
  Hostname moon.mma.club.uec.ac.jp
  User maccha
  IdentityFile ~/.ssh/id_rsa_moon
  ProxyJump sol

Host atlas
  User maccha
  IdentityFile ~/.ssh/id_rsa_atlas

Host hime
  User maccha
  IdentityFile ~/.ssh/id_rsa_hime

Host saga
  User maccha
  IdentityFile ~/.ssh/id_rsa_saga

Host mmagit
  HostName gitlab.mma.club.uec.ac.jp
  User git
  IdentityFile ~/.ssh/id_rsa_mma_gitlab

参考

MMA

他の方がどのように設定しているか、参考にした。

外部

ポートフォワーディングについて

ssh_configの記法を知った。

maccha/ssh_config (last edited 2021-10-06 23:58:44 by maccha)