LoginSignup
1

More than 3 years have passed since last update.

centos8.0でopenssh-serverの設定を行う

Last updated at Posted at 2019-10-21

yumを使ってopenssh-serverとvimをインストールする。

sudo yum -y install openssh-server
sudo yum -y install vim

vimを使ってssh_configを編集しセキュリティー設定を行う

sudo vim /etc/ssh/ssh_config

キーボードのaをクリックした後以下のように編集

PermitRootLogin no
PasswordAuthentication yes

[esp]キーをクリックし:wqでssh_configが保存される。

サービス起動&確認

sudo systemctl start sshd.service
sudo systemctl status sshd.service

でIPアドレス192.●●●.●●.●●を確認することができる。

ip a

同じネットワーク環境にあるPCからターミナル(コマンドプロンプト )で以下のコマンドからssh接続できる。

ssh -Y [ ユーザ名 ]@[ IPアドレス ]

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1