Home > System Tutorial > LINUX > SSH service startup and configuration guide: How to successfully set up and log in remotely

SSH service startup and configuration guide: How to successfully set up and log in remotely

WBOY
Release: 2024-06-14 09:46:41
Original
399 people have browsed it

SSH 服务启动与配置指南:如何成功设置并远程登录

It means your ssh service has been started. If it fails, try uninstalling it (see Step 6: Uninstalling the ssh service) and then installing it (Part 2: Installing the ssh service).

First step into the /etc directory. The /etc directory stores some configuration files, such as passwd and other configuration files. If you want to use ssh to remotely log in linux to install sshYulin Mufeng linux, you need to configure / For the configuration information in the etc/ssh/sshd_config file, use vim to edit the LINUX community. Enter vim/etc/ssh/sshd_config in the command line mode. After entering, press "i" to enter the editing state, find and change the file. Just two lines: PasswordAuthenticationyes, PermitRootLoginyeslinux installation ssh,

安装Linux虚拟机_linux 安装ssh_安装Linux系统步骤

安装Linux虚拟机_安装Linux系统步骤_linux 安装ssh

After making changes, press "esc" to exit, and press ":wq" to save and exit, or press ":x" to save and exit directly (Note: x here is uppercase x, and lowercase Encryption, please pay attention when using),

安装Linux虚拟机_安装Linux系统步骤_linux 安装ssh

After exiting the edit mode, return to the command mode, enter servicesshstart/stop/restart/status, start/stop/restart/status, and select start to start the ssh service.

安装Linux系统步骤_安装Linux虚拟机_linux 安装ssh

linux 安装ssh_安装Linux系统步骤_安装Linux虚拟机

If the command to enable the SSH service does not work, you can use the command: sudoservicesshdstart to try and check whether the SSH service is enabled. Use the command: ps-e|grepsshd

At this time, you can check whether the ssh status is running. In the running status, you can use ssh to log in remotely.

Use the "ifconfig" command to query the ip address

When logging in using ssh, enter the host (linux ip address), account number, and password to log in!

If you need to connect to SSH remotely, you need to open port 22 on the firewall, turn off the firewall, or set an exception for port 22/etc/init.d/iptablesstop

How to log in through ssh, please refer to the next article "Remote login to the server through ssh!"

The approximate steps are:

安装Linux虚拟机_安装Linux系统步骤_linux 安装ssh

SSH service configuration file location

/etc/ssh/sshd_config

#Change configuration

PasswordAuthenticationyes

安装Linux虚拟机_linux 安装ssh_安装Linux系统步骤

PermitRootLoginyes

#Start SSH service

sevicesshstart/stop/status

Install SSH: yuminstallssh

Start SSH: servicesshdstart

Set up and run: chkconfigsshdon

The above is the detailed content of SSH service startup and configuration guide: How to successfully set up and log in remotely. For more information, please follow other related articles on the PHP Chinese website!

source:itcool.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template