Today, just installed a Deepin, remote connection when the connection can not be found, the next discovery science is the absence of this service, then follows the successful even on!
If you are such a case, you may wish patience to read.
Information official website
1. Install SSH service
# nangy @ nangy-vm in ~ [9:31:14]
$ sudo apt install openssh-server
2. Verify whether to start
# nangy @ nangy-vm in ~ [11:09:05]
$ ps -e | grep ssh
00000 ? 00:00:00 sshd
If you see that sshd ssh-server Description has been launched
3. Start the SSH server
If you can not start like this:
# nangy @ nangy-vm in ~ [9:41:20]
$ sudo /etc/init.d/ssh start
or
# nangy @ nangy-vm in ~ [9:43:46]
$ service ssh start
or
# nangy @ nangy-vm in ~ [9:44:46]
$ systemctl restart sshd
4. Configure Port
ssh-server configuration file located in / etc / ssh / sshd_config, where you can define the SSH service port, the default port is 22, you can define your own into a different port number, such as 222
# nangy @ nangy-vm in ~ [9:36:22]
$ sudo vim /etc/ssh/sshd_config
- #Port 22 Chu is the modification of the local port, can not modify the default
- Then restart the SSH service:
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh start
or
sudo /etc/init.d/ssh restart
5. Use connector shell tool
- Then use the following ways landed SSH:
SSH [email protected]
Wherein the username for the user 192.168.1.111 machine, a password is required
6. Other commands
command | Explanation | Remark |
---|---|---|
sodo ssh -V | View openssh-server version | |
sudo /etc/init.d/ssh status | View openssh-server status |
Frequently Asked Questions 1
- View the logged in user
- The first to use w command to view the currently logged in user
here to explain the options related columns:
the USER: User login account name. Repeat users log in, the account will be repeated.
TTY: terminal user logged in with.
FROM: Displays the user login system where they are.
LOGIN @: LOGIN AT is meant to indicate the time to log into the system.
IDLE: user idle time, after the end of a mission from the user, in mind when meeting.
JCPU: a code to distinguish the terminal, indicates the touching time period, all processes associated with the terminal CPU time consuming task.
PCPU: refers to the execution of the task domain WHAT consuming CPU time.
WHAT: represents the currently executing task
pkill forced cancellation of the designated landing activities
- The first to use w command to view the currently logged in user
Use pkill -kill -t [TTY] command to do so, in which [the TTY] represents a terminal name that the user logged in with the terminal.
After running, you can use the w command again to verify success.
Related links
official website
to see a Linux user and logged pkill command to force users to exit activities
Quote:
SSH service - Deepin ↩︎