카테고리 없음

5. 오라클 클라우드 SSH 인증키 없이 유저 정보로 접속 하기

로아_ 2023. 3. 31. 14:14
728x90

오라클 클라우드의 기본 유저는 ubuntu라는 유저가 있다.

해당 유저는 기본 유저 이므로 신규 유저를 만든 후 SSH를 유저 암호로 접속하게 설정하려고 한다.

보안상 좋지는 않다. 일단 작업하기에 불편하므로 해당 설정을 하기로 하였다.

[유저생성 및 유저 홈 디렉토리 생성]

ubuntu@cloud:~$ sudo adduser roa
Adding user `roa' ...
Adding new group `roa' (1002) ...
Adding new user `roa' (1002) with group `roa' ...
Creating home directory `/home/roa' ...
Copying files from `/etc/skel' ...
New password:
Retype new password:
passwd: password updated successfully
Changing the user information for jaeya
Enter the new value, or press ENTER for the default
        Full Name []:
        Room Number []:
        Work Phone []:
        Home Phone []:
        Other []:
Is the information correct? [Y/n] y
ubuntu@cloud:~$

[유저 sudo 권한 뷰여]

ubuntu@cloud:/home$ sudo vi /etc/sudoers


# User privilege specification
root    ALL=(ALL:ALL) ALL
roa     ALL=(ALL:ALL) ALL

[SSH 유저 암호로 접속하게 설정]

sudo vi /etc/ssh/sshd_config

내용편집
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes

ssh 재시작
service sshd restart

 

728x90