root 연결 설정

  1. 일단 user1로 로그인 ㄱㄱ

  2. sudo passwd root

    [sudo] password for user1:
    New password: test123
    Retype new password: test123
    

    하면 설정됨

XShell 연결

  1. systemctl status sshd

    sshd 없다고 뜨면 설치 ㄱㄱ

  2. sudo apt update sudo apt upgrade

  3. sudo apt install openssh-server

    설치하면 /etc/ssh/sshd_config 생김

  4. sudo vi /etc/ssh/sshd_config

    Untitled

    PermitRootLogin의 주석을 해제한 후 prohibit-passwordyes로 수정한다.

    기본적으로 Root가 SSH로 로그인하는 것은 거부로 설정되어 있으므로 이를 허용하는 작업이 필요하다.

IP 주소 변경

  1. root@ubuntu:~# sudo vi /etc/netplan/00-installer-config.yaml

    # This is the network config written by 'subiquity'
    network:
      ethernets:
        ens32:
          addresses:
          - **211.183.3.50/24 #이 부분을 수정한다.**
          gateway4: 211.183.3.2
          nameservers:
            addresses:
            - 8.8.8.8
            search: []
      version: 2
    
  2. root@ubuntu:~# netplan apply

    변경 내용 적용