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アドレス ]