From f3025bde9628f1ccf0f13a2c9cfd665a6cdb94cd Mon Sep 17 00:00:00 2001 From: Marcin Jachymiak Date: Fri, 31 Jan 2020 14:16:11 -0500 Subject: [PATCH] Clean up README. Append to keys file Append to keys file, in case someone forgets to add a key to the file. This way they won't nuke the file by running the script and lose access to the server. --- setup-scripts/README.md | 15 +++++++++++---- setup-scripts/setup.sh | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/setup-scripts/README.md b/setup-scripts/README.md index 40082e37..3a118879 100644 --- a/setup-scripts/README.md +++ b/setup-scripts/README.md @@ -7,13 +7,20 @@ that we are working with a Debian Buster Minimal system or similar. ## Initial Setup (Assumes we are logged in as root on a fresh installation of Debian) +You may want to fork this repository and add your ssh pubkey to +`authorized_keys` and optionally edit the `tmux` and `bash` configurations. + +0. SSH in a freshly installed Debian machine. 1. `apt-get update && apt-get install sudo` 2. `adduser user` 3. `usermod -a -G sudo user` -4. QUIT SSH SESSION -5. ON LOCAL COMPUTER: `ssh-copy-id user@ip-addr` -6. ON LOCAL COMPUTER: `ssh user@ip-addr` -7. (LOGGED IN AS USER): `sudo apt-get install git` +4. Quit the ssh session. + +You a can now ssh into your machine as the user `user`. + +5. On your local machine: `ssh-copy-id user@ip-addr` +6. On your local machine: `ssh user@ip-addr` +7. Now logged in as `user`: `sudo apt-get install git` 8. `git clone https://github.com/NebulousLabs/skynet-webportal` 9. `cd skynet-webportal/setup-scripts` 10. Add ssh pubkeys to `authorized_keys` file. diff --git a/setup-scripts/setup.sh b/setup-scripts/setup.sh index 1c305e01..d47efd94 100755 --- a/setup-scripts/setup.sh +++ b/setup-scripts/setup.sh @@ -69,4 +69,4 @@ pm2 --name skynet start npm -- start cd $cwd sudo cp ./ssh_config /etc/ssh/ssh_config mkdir -p ~/.ssh -cp ./authorized_keys ~/.ssh/authorized_keys +cat ./authorized_keys >> ~/.ssh/authorized_keys