Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iMagesh
Created November 9, 2017 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iMagesh/230d99396f20bfc0300748a46dafe887 to your computer and use it in GitHub Desktop.
Save iMagesh/230d99396f20bfc0300748a46dafe887 to your computer and use it in GitHub Desktop.
For new user
adduser user_name
add sudo permission to the user
adduser user_name sudo
For generate key(local)
ssh-keygen -b 4096
copy key to server (ubuntu)
ssh-copy-id example_user@203.0.113.10
(MAC)
mkdir -p ~/.ssh && sudo chmod -R 700 ~/.ssh/ (server)
scp ~/.ssh/id_rsa.pub example_user@203.0.113.10:~/.ssh/authorized_keys (local)
Install RVM with RUBY AND RAILS
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --rails
source ~/.rvm/scripts/rvm
Install NPM
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
Disable root login
sudo vim /etc/ssh/sshd_config
set PermitRootLogin no
set PasswordAuthentication no
sudo systemctl restart sshd
or
sudo service ssh restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment