-
-
Save harssh/0dd21fccd0e369a9d6ec6f3f15949bdc to your computer and use it in GitHub Desktop.
Revisions
-
harssh renamed this gist
Sep 6, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
harssh revised this gist
Sep 6, 2022 . 1 changed file with 21 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,3 +25,24 @@ Push your ssh key to the authorized_keys file on the remote server scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys ``` Copy SSH keys ```bash ssh-copy-id deploy@<ubuntu-server-ip-address> ``` Disable password authentication ```bash sudo vim /etc/ssh/sshd_config # To disable tunneled clear text passwords, change to no here! PasswordAuthentication no #PermitEmptyPasswords no PubkeyAuthentication yes ``` Disable password prompt for deploy user when using the sudo command ```bash sudo visudo # Deploy deploy ALL=(ALL) NOPASSWD:ALL ``` -
learncodeacademy revised this gist
Oct 15, 2014 . 1 changed file with 2 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,16 +2,12 @@ Login to new server as root, then add a deploy user ```bash sudo useradd --create-home -s /bin/bash deploy sudo adduser deploy sudo sudo passwd deploy ``` And Update the new password Now login as that user ```bash -
learncodeacademy revised this gist
Oct 15, 2014 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ (wherever it says url.com, use your server's domain or IP) Login to new server as root, then add a deploy user ```bash sudo useradd --create-home deploy @@ -16,13 +18,13 @@ Now login as that user ssh [email protected] ``` Make directory .ssh on the remote server and log out ```bash mkdir .ssh exit ``` Push your ssh key to the authorized_keys file on the remote server ```bash scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys ``` -
learncodeacademy created this gist
Oct 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ Login to new server as root, then add a deploy user ```bash sudo useradd --create-home deploy sudo adduser deploy sudo sudo passwd deploy ``` Update the password, then Change the new users default to bash by adding `/bin/bash` to the end of the last line of `/etc/passwd` ```bash sudo vim /etc/passwd ``` Now login as that user ```bash ssh [email protected] ``` Make directory .ssh on the remote server ```bash mkdir .ssh exit ``` And add your ssh key to authorized keys ```bash scp ~/.ssh/id_rsa.pub [email protected]:~/.ssh/authorized_keys ```