Improved convert to server script.
This commit is contained in:
parent
02cad9a079
commit
ca40c8bdd0
@ -19,8 +19,15 @@ dialog --backtitle "Configure Stormux" \
|
||||
dialog --backtitle "Configure Stormux" \
|
||||
--msgbox "Now let's upload your ssh key. It is a good idea to go ahead and connect via ssh now, in case something goes wrong you will have a chance to fix it manually. This will be used to login to your server, so whatever you do, don't lose it. If you have not yet created an ssh key, you can do so with the ssh-keygen command. Magic-wormhole will be used to upload the key. if you are doing this from a Windows based ssh session, you can install magic-wormhole with scoop: https://github.com/ScoopInstaller/Scoop" -1 -1 --stdout
|
||||
mkdir -p ~/.ssh
|
||||
wormhole ssh invite
|
||||
if [[ -e ~/.ssh/known_hosts ]]; then
|
||||
dialog --backtitle "Configure Stormux" \
|
||||
--msgbox "Key found in ~/.ssh/known_hosts. If you are sure this is the correct key, press enter, otherwise press control+c to close this application and fix your key." -1 -1 --stdout
|
||||
else
|
||||
wormhole ssh invite
|
||||
fi
|
||||
if ! [[ -e ~/.ssh/authorized_keys ]]; then
|
||||
dialog --backtitle "Configure Stormux" \
|
||||
--msgbox "No ssh key found, exiting." -1 -1 --stdout
|
||||
exit 1
|
||||
fi
|
||||
sudo sed -i 's/^#PasswordAuthentication yes$/PasswordAuthentication no/' /etc/ssh/sshd_config
|
||||
|
Loading…
Reference in New Issue
Block a user