ssh gateway


title: “ssh gateway”
date: 2018-04-17T09:19:35
slug: ssh-gateway


cat .ssh/config

Other stuff you’d like goes here

Host muc-deploy
ForwardAgent yes

Host *.ampua.server.lan
ControlMaster auto
ControlPath ~/.ssh/connections/%r_%h_%p
ControlPersist yes
ProxyCommand none
PasswordAuthentication Yes

Uncomment this in case you want to use sshgw by dc

Host *-bs*

ProxyCommand /usr/bin/ssh ampua-bs-sshgw.ampua.server.lan %h

Host *-ba*

ProxyCommand /usr/bin/ssh ampua-bap-sshgw.ampua.server.lan %h

Host *-lx*

ProxyCommand /usr/bin/ssh ampua-lxa-sshgw.ampua.server.lan %h

Exceptions which do not pass the sshgw (e.g. git, jenkins)

You need to pass User and ProxyCommand none

Host github0*.server.lan github.com git.mamdev.server.lan puppet-repo*
User git
ProxyCommand none
Host ndcli.server.lan 46.165.253.99 35.156.56.25 46.165.253.133 dev.asanger.biz hsp-gmx-pre01.server.lan *cinetic.de logservice* unitix-repo01* reposrv-deb* lxjumper* osum-home-master *.united.domain
User tasanger
ProxyCommand none
Host *
User juxxpd
ProxyCommand /usr/bin/ssh ampua-bs-sshgw.ampua.server.lan %h

Print Friendly, PDF & Email