Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure ssh in CentOS7

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article focuses on "how to install and configure ssh in CentOS7". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let the editor take you to learn how to install and configure ssh in CentOS7.

1. Install openssh-serveryum install-y openssl openssh-server2. Modify the configuration file

Open the configuration file / etc/ssh/sshd_config with vim

Open the settings for PermitRootLogin,RSAAuthentication,PubkeyAuthentication in the image above.

Start the service of ssh:

Systemctl start sshd.service

Set the boot to start the ssh service automatically

Systemctl enable sshd.service

Set the access permissions for the folder ~ / .ssh:

$cd ~ $chmod 700.ssh $chmod 600.ssh / * $ls-la .ssh Total 16drwx Murray. 2 root root 58 May 15 00:23. Dr-xr-x---. 8 root root 4096 May 15 00:26.-rw-. 1 root root 403 May 15 00:22 authorized_keys-rw-. 1 root root 1766 May 15 00:21 id_rsa-rw-. 1 root root 403 May 15 00:21 id_rsa.pub

The authorized_keys file stores the client's public key.

At this point, I believe you have a deeper understanding of "how to install and configure ssh in CentOS7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report