OpenSSH 설치 및 사용법

I installed it in Centos 7 environment.참고 : https://velog.io/@gclee/CentOS-7-OpenSSH-%EC%84%A4%EC%B9%98-%EB%B0%8F-%EC%84%B8%ED%8C%85

CentOS 7 OpenSSH Installation and SettingsCentOS version was installed in minimal, but openssh was not installed.Use the following command to install.The configuration file path is /etc/ssh/sshd_config.”Port Desired After Modification” “PermitRoovelog.io ” before changing some of the options for the file

https://anything-93.tistory.com/23

[CentOS7] Secure Shell (SSH) SSH is designed to replace existing rsh, rlogin, telnet, and other applications or protocols that allow you to log in to other computers on your network, execute commands on remote systems, or copy files to other systems. Basically, port 22 is used and encryption technology is used, so it seems to be an encrypted character that cannot be understood even if communication is exposed. 1. 1. SSH 패키지 설치 #yum install openssh-server openssh···anything-93.tistory.com

Install ssh package (must be installed on all nodes)

yum -y install opensh-server opensh-module opensh-askpass

vi /etc/ssh/sshd_config 설정

Port 22 # Authorized Route Login yes # Password Authentication yes # 주해 제석

Apply Configurationsystem ctl status sshd#status check systemctl restart sshd#restartNote: If you see a firewall-related error, go down to the bottom and you’ll find a solution.Set virtual machine IP address and host namesudo vi /etc/hosts 192.168.0.60 “k8smatter” 192.168.0.61 “Name” 192.168.0.62 “Name”Enable ssh connection without passwordEnter only without entering the ssh-keygen password.You must copy the created key to the remote virtual machine and run it on all three servers.ssh-copy-id “k8smaster” sh-copy-id “k8sworker1” sh-copy-id “름이”If you don’t set the root password, the password error will continue.Therefore, you must set the root password in sudopasswd root.sudo passwd rootsudo systemctl restart sshAttempt to connect.ssh k8sworker1ssh k8sworker1Firewall related errors$ $ firewall-firewall –zone=public –add-port=22/premanent –permanent$ firewall-Open port 22.To connect to the k8s at the end, turn off the firewall settings for all v의s (do not turn off the firewall settings unless it is for k8s use)sudo ufw disable sudo ufw status # status: inactive – ssh k8sworker2 sudo ufw disable sudo ufw status··· 반복sudo ufw disable sudo ufw status # status: inactive – ssh k8sworker2 sudo ufw disable sudo ufw status··· 반복sudo ufw disable sudo ufw status # status: inactive – ssh k8sworker2 sudo ufw disable sudo ufw status··· 반복

error: Content is protected !!