본문 바로가기

🌅 리눅스/SSH 접속도구 & SSH

원격으로 SSH 접속 가능하도록 수정하는 방법

728x90
반응형

# VM을 SSH로 접근하기

- 아래의 유틸을 설치하자

sudo apt-get update

sudo apt-get install openssh-server

sudo apt-get install gedit

- SSH 설정 편집

sudo gedit /etc/ssh/sshd_config

- 주석 제거 후 저장

- VM의 IP주소를 확인하기 위해 설치

sudo apt install net-tools

ifconfig

- eth0 의 ip를 메모장에 기록 합니다.

- SSH에 접근해 봅시다

ssh {계정명}@{vm의 ip}

ssh k8s-master-node@192.168.137.50

- 접속 성공 (이젠 편하게 작업할 수 있겠다...)

PS C:\WINDOWS\system32> ssh k8s-master-node@192.168.137.50
The authenticity of host '192.168.137.50 (192.168.137.50)' can't be established.
ECDSA key fingerprint is SHA256:xg0ta5sHDbWeBnS8FV43J0JB8XJzekSyfhzrHn5BbsI.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.137.50' (ECDSA) to the list of known hosts.
k8s-master-node@192.168.137.50's password:
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-38-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

104 updates can be applied immediately.
41 of these updates are standard security updates.
추가 업데이트를 확인하려면 apt list --upgradable 을 실행하세요.

Your Hardware Enablement Stack (HWE) is supported until April 2025.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

k8s-master-node@k8smasternode-Virtual-Machine:~$

- 끗 -

728x90
반응형