Closed jeffi closed 1 year ago
We can leave a sudo ls
at the beginning of the AWS class, but the code might not that clean.
Not a bad idea, but that assumes that sudo
is set up to not ask for a password each time.
At least when I am deploying it on NUC, it only prompts for the first sudo command. I am not sure how it behaves on other machines
Yeah, that's the default on Ubuntu, I think. But other systems will have different settings. https://askubuntu.com/a/636095
I'd also suggest that if we can remove the need for a sudo password prompt altogether, that might be the most ideal solution (assuming we can do so without sacrificing security).
The VPN start script is now moved up (only in main branch, do we want to also have this in the humble branch)? Passwordless sudo with an SSH key is also reasonably safe (I would argue just as safe as what we're doing now, provided the user executing the ROS payload is different from the user with passwordless sudo access).
We can ship a cloud-init config (cloud-init is distro and cloud-provider agnostic) when booting up the image for the first time with the SSH key and just rely on sudo to let us through with no password for all future executions.
Needs to be merged/moved into Humble Branch
@nikhiljha can you PR this for humble?
Is your feature request related to a problem? Please describe. It can take a while after launch before the user is prompted for a password to setup the VPN. Ideally all sudo operations could happen right after launch so that the user can walk away and rely on it launching.