ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • [CoreOS] CoreOS SSH 설정 변경
    CoreOS 2017. 1. 28. 13:19

    Customizing the SSH Daemon

    SSH 설정을 변경할 수 있습니다.  

    Cloud-Config

    #cloud-config
     
    ssh_authorized_keys:
      - ssh-rsa AAAAB3NzaC1y.....
     
    write_files:
      - path: /etc/ssh/sshd_config
        permissions: 0600
        owner: root:root
        content: |
          # Use most defaults for sshd configuration.
          UsePrivilegeSeparation sandbox
          Subsystem sftp internal-sftp
          PermitRootLogin no
          AllowUsers core
          PasswordAuthentication no
          ChallengeResponseAuthentication no
     
    coreos:
      units:
        - name: sshd.socket
          command: restart
          content: |
            [Unit]
            Description=OpenSSH Server Socket
            Conflicts=sshd.service
    
            [Socket]
            ExecStartPre=/usr/bin/sleep 5
            ListenStream=2022
            ReusePort=true
            FreeBind=true
            Accept=yes
    
            [Install]
            WantedBy=sockets.target

    댓글