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 configure SSH remote connection on the CentOS server side

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains "how to configure SSH remote connection on the CentOS server side". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to configure SSH remote connection on the CentOS server side".

With CentOS 6. 4 installed, I want it to be a server that allows my Windows 7 computer to log in remotely.

Install OpenSSH Server

First, let's search CentOS's software library to see if there is a defined SSH server package:

The code is as follows:

$yum search ssh

... ...

Openssh.x86_64: An open source implementation of SSH protocol versions 1 and 2

Openssh-askpass.x86_64: A passphrase dialog for OpenSSH and X

Openssh-clients.x86_64: An open source SSH client applications

Openssh-ldap.x86_64: A LDAP support for open source SSH server daemon

Openssh-server.x86_64: An open source SSH server daemon

... ...

OpenSSH is an open source implementation of Secure Shell. As can be seen from the above search results, OpenSSH server package (openssh-server) and client package (openssh-clients) are already available in CentOS's software library, which can be installed directly with yum install.

The code is as follows:

$yum install openssh-server

After the OpenSSH Server installation is complete, a service called sshd should be added to the / etc/init.d directory.

The code is as follows:

$chkconfig-list sshd

Sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Start the sshd service manually to facilitate the connection of the following clients:

Close:

The code is as follows:

/ etc/init.d/sshd stop

Start:

The code is as follows:

/ etc/init.d/sshd start

Restart:

The code is as follows:

/ etc/init.d/sshd restart

Running

1. Take effect after restart

Enable:

The code is as follows:

Chkconfig sshd on

Close:

The code is as follows:

Chkconfig sshd off

2. Effective immediately and expire after restart

Enable:

The code is as follows:

Service sshd start

Close:

The code is as follows:

Service sshd stop

Solution to the problem of Chinese garbled code in SSH connection in PS:CentOS

CentOS 6, if the Chinese garbled code is echoed in SSH, then:

Modify / etc/sysconfig/i18n file

Command:

The code is as follows:

Vi / etc/sysconfig/i18n

Finally change the text inside to:

The code is as follows:

LANG= "zh_CN.GB18030"

LANGUAGE= "zh_CN.GB18030:zh_CN.GB2312:zh_CN"

SUPPORTED= "zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en"

SYSFONT= "lat0-sun16"

Finally, you can disconnect and reconnect the SSH. You can check the effect by using the date command.

Thank you for reading, the above is the content of "how to configure SSH remote connection on the CentOS server side". After the study of this article, I believe you have a deeper understanding of how to configure SSH remote connection on the CentOS server side, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Servers

Wechat

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

12
Report