Re:Show HN: Invite friends to SSH into your laptop using the...
by broknbottle on Wednesday January 25, 2017 @11:53PM
(#13488856)
if the connection closes mid stream it could potentially run something catastrophic (rm -rf /) as sh will execute the partial command in its buffer.
[ Parent
| on HN ]
Re:Show HN: Invite friends to SSH into your laptop using the...
by geofft on Thursday January 26, 2017 @12:33AM
(#13489011)
Yes. Wrap the entire script in a function and call the function at the end once the whole thing has transferred. https://install.sandstorm.io/ , for instance, does this.