SSHトンネル、ポート転送設定

SSHトンネル、ポート転送設定

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

ベストアンサー1

おすすめ記事