Scott Williams 🐧 on Nostr: Rebooted a server and want to ssh into it as soon as it comes back up? while [[ 1 ]] ...
Rebooted a server and want to ssh into it as soon as it comes back up?
while [[ 1 ]] ; do ssh some_server && break ; sleep 5 ; done
(This one is particularly useful when you can't ping the remote sever.)
#bash #Linux #ssh
Published at
2023-10-20 23:40:33Event JSON
{
"id": "0b96d486ce64d75499bd30a7fdcd914616811d690b24c314f50d6514ebe33d63",
"pubkey": "beee28c6450eb5d21bf94279d1f3f41e524c87abf86393835b45e6a1e98390e7",
"created_at": 1697845233,
"kind": 1,
"tags": [
[
"t",
"bash"
],
[
"t",
"linux"
],
[
"t",
"SSH"
],
[
"proxy",
"https://mastodon.online/users/vwbusguy/statuses/111269985214163094",
"activitypub"
]
],
"content": "Rebooted a server and want to ssh into it as soon as it comes back up?\n\nwhile [[ 1 ]] ; do ssh some_server \u0026\u0026 break ; sleep 5 ; done\n\n(This one is particularly useful when you can't ping the remote sever.)\n\n#bash #Linux #ssh",
"sig": "4760fa0df74f6084b87bca78f02188d4cb133b8a49f294f9697b6f70c71b32ccc9e923d48f97415488d53810bea6aa892cc0079c95299f7c67f1bb50b5bb81b8"
}