Last active
December 12, 2022 01:38
-
-
Save guinslym/35ee8ce9e94bb2e74871977b8746d63e to your computer and use it in GitHub Desktop.
This file contains 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 characters
#create user | |
useradd -m -s /bin/bash -G sudo john | |
passwd john | |
#verify if user exist | |
cat /etc/passwd | grep john | |
groups john | |
#Upload SSH Key from local to remote server | |
#create ssh-key | |
cd ~/.ssh | |
ssh-keygen -f djangoappssh | |
ssh-copy-id -i djangoappssh john@ip_address | |
ssh john@172.105.6.68 -i djangoappssh | |
touch ~/.ssh/config | |
vim config | |
#Add content into config | |
➜ .ssh cat config | |
Host jo | |
HostName ip_address | |
User john | |
IdentityFile ~/.ssh/djangoappssh | |
#login to remote server | |
ssh jo | |
#change terminal | |
john@ip_address | |
#change login info | |
sudo vim /etc/ssh/sshd_config | |
#PermitRootLogin no | |
PublicKeyAuthentification yes | |
#PasswordAuthentification no | |
#restart SSH Daemon | |
sudo systemctl restart sshd | |
#copy external IP address from to Linode #ETHO (without /24) | |
#LINODE - DOMAIN AAAA revords | |
sudo apt update | |
sudo apt upgrade | |
sudo apt install nginx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment