脳みそスワップアウト

揮発性なもので。おもにPHPのこととか。

多段SSH

PC --(pubkey)--> 踏み台(bastion) --(password)--> リモート(remote1, remote2)

# 踏み台
Host bastion
  Hostname bastion.exapmle.com
  User pen
  PreferredAuthentications publickey
  IdentityFile ~/.ssh/bastion.id_rsa
  IdentitiesOnly yes
# 踏み台の先
Host remote1 remote2
  User www
  PreferredAuthentications password
  ProxyCommand ssh -W %h:%p bastion
Host remote1
  Hostname remote1.example.com
Host remote2
  Hostname remote2.example.com