Linux, Mac
Ubuntu 20.04 - SSH 설치와 접속 방법
수알치
2022. 9. 28. 22:17
Ubuntu 20.04 - SSH 설치와 접속 방법
Ubuntu 20.04 - SSH 설치와 접속 방법 (codechacha.com)
Ubuntu 20.04 - SSH 설치와 접속 방법
Open SSH Sever를 설치하면, 다른 PC의 SSH Client에서 접속할 수 있습니다. 설치 과정을 소개합니다. Terminal에서 다음과 같은 명령어로 Open SSH Server를 설치합니다. sudo apt install openssh-server SSH를 설치하면
codechacha.com
서버
1. OpenSSH 서버 설치
$ sudo apt update
$ sudo apt install openssh-server
2. 상태 확인
sudo systemctl status ssh
3. 실행하기
$ sudo systemctl enable ssh
$ sudo systemctl start ssh
4. 방화벽 허용과 상태 확인
$ sudo ufw allow ssh
$ sudo ufw status
Status: inactive
5. SSH 비활성화 / 중지
중지
$ sudo systemctl stop ssh
부팅 시 비활성 설정
$ sudo systemctl disable ssh
부팅 시 자동 실행 설정
$ sudo systemctl stop ssh
$ sudo systemctl enable ssh
클라이언트
1. 설치
$ sudo apt-get install openssh-client
2. 접속 ( ssh 계정@접속 도메인(또는 IP) )
$ ssh username@ip_address
$ ssh ubuntu@192.168.10.25
The authenticity of host '192.168.0.14 (192.168.0.14)' can\'t be established.
ECDSA key fingerprint is SHA256:TmCvd0W1ETUS5rpK1fnDh7gEiS6QIVUfKXC3kh6ucMg.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
암호 요구하는 곳에서 암호 입력...
3. 접속 성공 화면
Welcome to Ubuntu 20.04.1 LTS (GNU/Linux 5.4.0-58-generic x86_64)
반응형