![SSH 터널, 포트 포워딩 설정](https://linux55.com/image/95066/SSH%20%ED%84%B0%EB%84%90%2C%20%ED%8F%AC%ED%8A%B8%20%ED%8F%AC%EC%9B%8C%EB%94%A9%20%EC%84%A4%EC%A0%95.png)
SSH 터널링을 위한 간단한 bash 스크립트가 있습니다.
createTunnel() {
/usr/bin/ssh -i /home/miner/EC2.pem -f -N -R 10022:localhost:22 -L 19922:[email protected]:22 [email protected]
if [[ $? -eq 0 ]]; then
echo Tunnel created successfully
else
echo An error occurred
fi
}
/usr/bin/ssh -p 19922 localhost ls > /dev/null
if [[ $? -ne 0 ]]; then
echo Creating new tunnel
createTunnel
fi
실행하면 다음 오류가 발생합니다. 가능한 이유는 무엇입니까?
channel_setup_fwd_listener: cannot listen to port: 10022
channel_setup_fwd_listener_tcpip: cannot listen to port: 19922
channel 2: open failed: administratively prohibited: open failed
channel 3: open failed: administratively prohibited: open failed