ඒ හා සමාන ගැටළුවක්
විය හැකි තවත් ඊයම්
මටත් ඒ වගේ ප්රශ්නයක් ~/.ssh/authorized_keysතිබුණා permitopen.
මම autosshඋමගක් සෑදීමට භාවිතා කරන විට, මට වරායන් දෙකක් අවශ්යයි:
- සම්බන්ධතාවය සඳහා එකක් (10000),
- අධීක්ෂණය සඳහා එකක් (10001).
සේවාදායකයාගේ පැත්තෙන්
වරාය අධීක්ෂණය කිරීමේදී මෙය මට සමාන ගැටලුවක් ලබා දුන්නේය:
autossh -M 10001 -o GatewayPorts=yes -o ServerAliveInterval=60 -o TCPKeepAlive=yes -T -N -R :10000:localhost:22 -i ~/.ssh/id_rsa user@remote
මට එම පණිවිඩය ලැබුණි (මිනිත්තු 10 කට පසු):
channel 2: open failed: administratively prohibited: open failed
දුරස්ථ පැත්තේ
මගේ /var/log/auth.logඅඩංගු:
Received request to connect to host 127.0.0.1 port 10001, but the request was denied.
මගේ ~/.ssh/authorized_keys(දුරස්ථ පැත්තෙහි) මට මෙය තිබුණි:
command="/home/user/tunnel",no-X11-forwarding,no-pty,permitopen="localhost:10000",permitopen="localhost:10001" ssh-rsa AAAA...
එය විසඳන්නේ කෙසේද
මම වෙනුවට මෙම විසඳා localhostසමග අවස්ථා 127.0.0.1:
command="/home/user/tunnel",no-X11-forwarding,no-pty,permitopen="127.0.0.1:10000",permitopen="127.0.0.1:10001" ssh-rsa AAAA...
එය localhostකෙටිමඟක් බව SSH තේරුම් නොගන්නා බව පෙනේ 127.0.0.1, එම නිසා පණිවිඩය auth.logසහ පරිපාලනමය වශයෙන් තහනම් පණිවිඩය.
මෙහි මා තේරුම් ගත් දෙය නම් පරිපාලනමය වශයෙන් අදහස් කරන්නේ "සේවාදායක පැත්තේ නිශ්චිත වින්යාසයක් හේතුවෙන්" යන්නයි.