728x90
보통 리눅스 배포판을 이용하여 서버를 설치 후에는 초기에 ssh 접속이 안되는 경우가 많습니다.
이에 ssh 서버 데몬을 설치하고 이를 통해 서버에 접속하는 절차를 소개합니다.
1. ssh 서버 설치
apt 정보를 업데이트한 후 install명령으로 openssh 서버를 설치합니다.
$ sudo apt update
$ sudo apt install openssh-server
2. ssh 서버 실행
systemctl 명령을 통해 서버를 실행하고 필요 시 부팅실행을 설정합니다.
$ sudo systemctl start ssh # 서버를 지금 실행
$ sudo systemctl enable ssh # 부팅 시 자동으로 실행되도록 설정
2. ssh 서버에 접속
ssh 명령을 실행하여 서버에 접속합니다. 첫 접속이라면 아래와 같이 key 추가 확인 메시지가 나타납니다.
C:\Users\john>ssh user@192.168.1.100
The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established.
ED25519 key fingerprint is SHA256:OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
user@192.168.1.100's password:
Linux 6.12.25-amd64 #1 SMP PREEMPT_DYNAMIC x86_64
The programs included with the Kali GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
$
3. 결론
ssh 서버 데몬을 설치하고 이를 통해 서버에 접속하는 절차를 소개했습니다.
728x90
'Linux' 카테고리의 다른 글
bash 스크립트 실행 시 관리자권한 확인하기 (0) | 2022.12.10 |
---|---|
리눅스에 설치된 mongodb 외부접속 허용하기 (0) | 2022.03.07 |
Ubuntu 18.04.5에서 netplan으로 고정IP 설정하기 (0) | 2022.03.01 |