해뜨기전에자자

ssh proxy, ssh local fowarding 본문

개발/linux & tools

ssh proxy, ssh local fowarding

조앙'ㅁ' 2018. 3. 20. 23:43
임의로 98765 포트에 proxy용 ssh server을 띄운다.

/etc/ssh/sshd_config 
Port 22
Port 98765
GatewayPorts yes
PermitTunnel yes
AllowTcpForwarding yes

재시작
sudo service sshd restart

local machine:~/.ssh/config
Host ssh-proxy-server
  User {username}
  GSSAPIAuthentication yes
  StrictHostKeyChecking no
Host !ssh-proxy-server *
  User {username}
  StrictHostKeyChecking no
  GSSAPIAuthentication yes
  ForwardAgent yes
  ProxyCommand ssh -W %h:%p ssh-proxy-server -p 98765 %h -p %p

ssh local fowarding

ssh -L {local port}:{remote server}:{remote port} {ssh-proxy-server}
ex: ssh -L 18032:remote-server:80 ssh-proxy-server


'개발 > linux & tools' 카테고리의 다른 글

container 간단히  (0) 2019.01.17
systemd initd  (0) 2018.11.25
haproxy vs nginx?  (0) 2018.05.16
route private network  (0) 2018.03.20
adduser 와 useradd  (0) 2017.10.30