To make the installation unatended you can run
curl https://sh.rustup.rs -sSf | sh -s -- -y
If you are ssh’d you should add the nohup parameter in front
With the -s
parameter, you set sh to read commands from the standard input, and then you pass the -y
to auto accept the options
For more info about sh you can see the man pages