traceroute is a computer network diagnostic tool for displaying the route (path) and measuring transit delays of packets across an Internet Protocol (IP) network
traceroute example.comhttps://linuxmoz.com/vi-commands-cheat-sheet/
u (undo)
control + r (redo)
dd (delete the line)
/keyword (search word)
n (move forward to next search result)
N (move backward to previous search result)
:q! (discard change and quit)
:wq (save change and quit)cd ~cd ~/.ssh/ssh-keygen -t rsaless keyname
less keyname.pubcat ~/.ssh/my_key.pubLog as root
ssh -i ~/.ssh/ my_key root@128.199.166.66tophtop is better one than just top
apt-get install htop
htopapt-get updatesudo tail -f /var/log/auth.logadduser usernameusermod -aG sudo usernameid -G -n usernamepasswd usernamesu usernameand
exitWill be back to the root user.
cat /var/log/auth.logIt will go for permission denied
sudo !!or
sudo cat /var/log/auth.logssh username@128.199.166.66If the console reports permission denied (publickey), please do following:
vim /etc/ssh/sshd_configUsePAM yes
IgnoreUserKnownHosts no
PasswordAuthentication noto
UsePAM no
IgnoreUserKnownHosts no
PasswordAuthentication yesand save the change 3. restart ssh service
service ssh restartProblem resolved! Let’s ssh again and login to the server now. But watch out, login server via the pwd is dangerous. Let introduce a much safer way below.
It is much better secure comparing to just pwd.
cat my_key.pub | ssh username@128.199.166.66 "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"What did these lines do?
.ssh folderauthorized_keys fileAnd it might ask about the pwd.
Juts type in and hit enter.
Now login without pwd.
ssh -i ~/.ssh/my_key -p 1234 username@128.199.166.66sudo vim /etc/ssh/sshd_configPermitRootLogin yes
PasswordAuthentication yesto
PermitRootLogin no
PasswordAuthentication noSave the changes and quit 3. restart the service
sudo service ssh restartA Record. That means:Type: choose 'A Record'
Host: one is '@', another is 'www'
value: 128.199.166.66nslookup domain.comIt will list the domain info.
sudo apt-get install nginxsudo service nginx startGo and verify it via the domain or ip address 4. check the config
cat /etc/nginx/sites-available/defaultor
less /etc/nginx/sites-available/defaultsudo apt-get install gitsudo apt-get install nodejs npmnode -v and see whether the env is in the node env.
If it is not working, symlink nodejs to node usingsudo ln -s /usr/bin/nodejs /usr/bin/nodewww foldersudo mkdir -p /var/wwwroot to the choose userBefore that, let’s see who is the owner of the folder.
ls -l /path/to/file/or/folderThen.
sudo chown -R $USER:$USER /var/wwwor specify user and group
sudo chown -R username:usergroup /var/wwwBe careful with this command and only use it when the user really need the all the permission to one folder.
rmdir tmp tmp2or
rmdir tmp*mv incorrectname correctnamepm2, nodemon, forever… Choose one and follow the instructions.