본문으로 바로가기

centOS SSH 설치 및 접속

category [ 서버 & DB 관련 ]/리눅스 2022. 3. 15. 19:18

openssh-server 설치 

# yum install openssh-server openssh-clients openssh-askpass

 

설정파일 편집

# vi /etc/ssh/sshd_config


상태확인

# systemctl status sshd


시작

# systemctl start sshd


재시작

# systemctl restart sshd


자동 실행 등록

# systemctl enable sshd


접속

# ssh -p [포트번호] 계정@IP



원격지에서 오류 발생
kex_exchange_identification: Connection closed by remote host

22번 포트 열어줘야 함