Difference between revisions of "Basic"
From AlphaBook
(→SSH) |
|||
Line 31: | Line 31: | ||
* sudo vim /etc/ssh/sshd_config | * sudo vim /etc/ssh/sshd_config | ||
* sudo service ssh restart | * sudo service ssh restart | ||
+ | |||
+ | == Service == | ||
+ | * sudo systemctl status ssh | ||
+ | * sudo systemctl start ssh | ||
+ | * sudo systemctl stop ssh | ||
+ | * sudo systemctl restart ssh | ||
+ | * sudo systemctl reload ssh | ||
+ | * sudo systemctl enable ssh | ||
+ | * sudo systemctl disable ssh | ||
+ | * sudo systemctl is-enabled ssh | ||
+ | * sudo systemctl is-active ssh | ||
+ | * sudo systemctl show ssh |
Revision as of 14:00, 26 September 2018
apt-get
- sudo apt-get update
- sudo apt-get install net-tools
- sudo apt-get install vim
- sudo vim /etc/apt/sources.list
Network
- List network adaptors
- ip a
- sudo vim /etc/netplan/01-network-manager-all.yaml
- network:
- version: 2
- renderer: NetworkManager
- ethernets:
- ens33:
- addresses: [192.168.200.55/24]
- gateway4: 192.168.200.1
- ens33:
- sudo netplan apply
- /etc/resolv.conf
- name server 114.114.114
- search corp.alphabook.cn
- Command 'ifconfig' not found, but can be installed with:
- sudo apt install net-tools
SSH
- sudo apt-get install openssh-server
- sudo vim /etc/ssh/sshd_config
- sudo service ssh restart
Service
- sudo systemctl status ssh
- sudo systemctl start ssh
- sudo systemctl stop ssh
- sudo systemctl restart ssh
- sudo systemctl reload ssh
- sudo systemctl enable ssh
- sudo systemctl disable ssh
- sudo systemctl is-enabled ssh
- sudo systemctl is-active ssh
- sudo systemctl show ssh