家のDesktopに外からsshで繋ぎたい、けれどglobal IPがたまに変更されてしまうときに使えます
get_global_ip.sh
while true; do curl --silent inet-ip.info > output_file; sleep 36000; done
あとはoutput_fileをクラウドにあげるなり、メールで定期的に自分に送れば知らないうちにglobal ipが変更になっていてもsshを繋げます。
More than 3 years have passed since last update.
家のDesktopに外からsshで繋ぎたい、けれどglobal IPがたまに変更されてしまうときに使えます
while true; do curl --silent inet-ip.info > output_file; sleep 36000; done
あとはoutput_fileをクラウドにあげるなり、メールで定期的に自分に送れば知らないうちにglobal ipが変更になっていてもsshを繋げます。
Register as a new user and use Qiita more conveniently