Professional Documents
Culture Documents
Shribee Linux
Shribee Linux
Initial configuration
History Operations
sudo apt-get update
~/.bash_history contains history even after reboot
sudo apt-get install git
!v run last command that starts with v
sudo apt install net-tools
!$ last argument
sudo apt install vim
!?etc last command contains etc
history show command history
Setup ssh
cd . change to home dir
sudo apt update (server) update package
repository !30 run command at line number 30 from
history
sudo apt install openssh-server (server) install ssh
ctrl-r search commands, esc or enter to
sudo systemctl status ssh (server) check status of
edit or run
service
HISTCONTROL=erasedups erase duplicate commands from
sudo ufw allow ssh (server) enable firewall
history
sudo systemctl enable ssh (server) start ssh upon boot
history -c + history -w clear history
ssh-keygen (client) create key pair
history -r whenever you last wrote
ssh-copy-id username@remote_host (linux) copy public key
mkdir -p ~/.ssh (winows) copy public key Shutdown
sudo nano ~/.ssh/authorized_keys
shutdown shutdown
<copy content of .pub file>
reboot reboot
sudo chmod -R go= ~/.ssh (server) set permissions
poweroff same as shutdown
sudo chown -R <user> ~/.ssh
halt same as shutdown
ssh <user>@<ip> -i <full path of (client) connect
private key> init 0 same as shutdown