도커

    Docker) redhat7 - service command not found

    docker에서 redhat을 다운로드하고 ssh를 하기 위해 service ssh start를 하려고 했다. service command not found 가 나와서 # yum install initscripts 후 service 명령어를 사용하면 될 것이다. 만약 그래도 service ssh start 가 안된다면 # systemctl start sshd 를 사용하면 된다.

    외부에서 도커 접속 ssh

    (Ubuntu) 1. 업데이트 하기 apt-get update && apt-get install apt-file -y && apt-file update && apt-get install vim -y 위의 코드 사용하면 한번에 설치됨 추가로 apt-get install -y sudo 2. openssh-server - ssh 접속을 위해 필요 apt-get install net-tools nano openssh-server 3. ssh config 변경 vi /etc/ssh/sshd_config 파일 가운데의 PermitRootLogin을 yes로 바꿈 : 해당 설정을 바꾸지 않으면 다른 컴퓨터에서 일치하는 root 비밀번호를 넣더라도 접속이 되지 않는다. root로 접속하면 모든 권한을 가지므로 위험할 ..