# docker -v && docker-machine -v && docker-compose -v
Docker version 1.6.2, build ba1f6c3/1.6.2
docker-machine version 0.3.1 (40ee236)
docker-compose version: 1.3.3
CPython version: 2.7.9
OpenSSL version: OpenSSL 1.0.1e 11 Feb 2013
# rpm -qa | grep virtual -i
VirtualBox-4.3-4.3.30_101610_el7-1.x86_64
docker-machine create๊ฐ ์ค๋จ๋๊ณ ๋๋ฒ๊ทธ ๋ก๊ทธ :
Getting to WaitForSSH function...
Testing TCP connection to: localhost:45105
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /root/.docker/machine/machines/dev2/id_rsa -p 45105 docker<strong i="8">@localhost</strong> exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : exit status 255
Getting to WaitForSSH function...
Testing TCP connection to: localhost:45105
Using SSH client type: external
About to run SSH command:
exit 0
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /root/.docker/machine/machines/dev2/id_rsa -p 45105 docker<strong i="9">@localhost</strong> exit 0] [] <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : exit status 255
... ...
๋๋ ์ด๊ฒ์ด ๋ด๊ฐ MacOSX์์ ๊ฒช๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค. ์ฒ์๋ถํฐ ์ VirtualBox Dev VM์ ๋ง๋ค๊ธฐ ์ํด ๋ช ๋ฒ ์๋ํ์ต๋๋ค. .docker /๋ฅผ ์ ๋ฆฌํ๊ณ VBOX 5์์ ๋ค์ด ๊ทธ๋ ์ด๋ํ์ต๋๋ค.
% docker-machine --version
docker-machine version 0.3.0 (0a251fe)
% VirtualBox --help | head -n 1
Oracle VM VirtualBox Manager 4.3.30
% docker-machine ls
error getting URL for host dev: exit status 255
NAME ACTIVE DRIVER STATE URL SWARM
dev * virtualbox Running
ํ์ํ ํน์ ๋ก๊ทธ / ์ ๋ณด๊ฐ ๋ฌด์์ธ์ง ์๋ ค์ฃผ์ธ์. ๋ค์์ ๋ด ๋๋ฒ๊ทธ ๋ก๊ทธ ์ ๋ณด์
๋๋ค.STDERR : ์คํ ์ค : / usr / bin / VBoxManage modifyvm docker-vm --nic2 hostonly --nictype2 82540EM --hostonlyadapter2 vboxnet2 --cableconnected2 on STDOUT : STDERR : ์คํ ์ค : / usr / bin / VBoxManage modifyvm docker-vm --natpf1 delete ssh STDOUT : STDERR : VBoxManage : ์ค๋ฅ : ์ฝ๋ NS_ERROR_INVALID_ARG (0x80070057)-์๋ชป๋ ์ธ์ ๊ฐ (ํ์ฅ ์ ๋ณด๋ฅผ ์ฌ์ฉํ ์ ์์) VBoxManage : ์ค๋ฅ : ์ปจํ ์คํธ : VBoxManageModifyVM.cpp ํ์ผ์ 1717 ํ์ "RemoveRedirect (Bstr (ValueUnion.psz) .raw ())" ์คํ ์ค : / usr / bin / VBoxManage modifyvm docker-vm --natpf1 ssh, tcp, 127.0.0.1,50083,, 22 STDOUT : STDERR : ์คํ ์ค : / usr / bin / VBoxManage startvm docker-vm --type headless STDOUT : VM "docker-vm"์ ์ ์์ด ์ผ์ง๊ธฐ๋ฅผ ๊ธฐ๋ค๋ฆฌ๋ ์ค ... VM "docker-vm"์ด ์ฑ๊ณต์ ์ผ๋ก ์์๋์์ต๋๋ค. STDERR : VM ์์ ์ค ... WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ... TCP ์ฐ๊ฒฐ ํ ์คํธ : localhost : 50083 SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ์ธ๋ถ SSH ๋ช ๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค. 0 ๋ฒ ์ถ๊ตฌ & {/ usr / bin / ssh [/ usr / bin / ssh -o PasswordAuthentication = no -o IdentitiesOnly = yes -o StrictHostKeyChecking = no -o UserKnownHostsFile = / dev / null -o LogLevel = quiet -o ConnectionAttempts = 3 -o ConnectTimeout = 10 -i /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker @localhost exit 0] [][] ? reflect.Value? ๊ฑฐ์ง [] [] [] [] } SSH cmd ์ค๋ฅ, ์ถ๋ ฅ : ์ข ๋ฃ ์ํ 255 : ssh ๋ช ๋ น 'exit 0'๊ฐ์ ธ ์ค๊ธฐ ์ค๋ฅ : ์ข ๋ฃ ์ํ 255 WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ... TCP ์ฐ๊ฒฐ ํ ์คํธ : localhost : 50083 SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ์ธ๋ถ SSH ๋ช ๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค. 0 ๋ฒ ์ถ๊ตฌ & {/ usr / bin / ssh [/ usr / bin / ssh -o PasswordAuthentication = no -o IdentitiesOnly = yes -o StrictHostKeyChecking = no -o UserKnownHostsFile = / dev / null -o LogLevel = quiet -o ConnectionAttempts = 3 -o ConnectTimeout = 10 -i /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker @localhost exit 0] [] [] ? reflect.Value? ๊ฑฐ์ง [] [] [] [] } SSH cmd ์ค๋ฅ, ์ถ๋ ฅ : ์ข ๋ฃ ์ํ 255 : ssh ๋ช ๋ น 'exit 0'๊ฐ์ ธ ์ค๊ธฐ ์ค๋ฅ : ์ข ๋ฃ ์ํ 255 WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ... TCP ์ฐ๊ฒฐ ํ ์คํธ : localhost : 50083 SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ์ธ๋ถ SSH ๋ช ๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค. 0 ๋ฒ ์ถ๊ตฌ & {/ usr / bin / ssh [/ usr / bin / ssh -o PasswordAuthentication = no -o IdentitiesOnly = yes -o StrictHostKeyChecking = no -o UserKnownHostsFile = / dev / null -o LogLevel = quiet -o ConnectionAttempts = 3 -o ConnectTimeout = 10 -i /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker @localhost exit 0] [] [] ? reflect.Value? ๊ฑฐ์ง [] [] [] [] } SSH cmd ์ค๋ฅ, ์ถ๋ ฅ : ์ข ๋ฃ ์ํ 255 : ssh ๋ช ๋ น 'exit 0'๊ฐ์ ธ ์ค๊ธฐ ์ค๋ฅ : ์ข ๋ฃ ์ํ 255 WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ... TCP ์ฐ๊ฒฐ ํ ์คํธ : localhost : 50083 SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ์ธ๋ถ SSH ๋ช ๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค. 0 ๋ฒ ์ถ๊ตฌ & {/ usr / bin / ssh [/ usr / bin / ssh -o PasswordAuthentication = no -o IdentitiesOnly = yes -o StrictHostKeyChecking = no -o UserKnownHostsFile = / dev / null -o LogLevel = quiet -o ConnectionAttempts = 3 -o ConnectTimeout = 10 -i /Users/tehmasp/.docker/machine/machines/docker-vm/id_rsa -p 50083 docker @localhost exit 0] [] [] ? reflect.Value? ๊ฑฐ์ง [] [] [] [] }
VM์ ์๋์ผ๋ก ๋ก๊ทธ์ธ ํ ์ ์๊ณ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค. ๋ฐ๋ผ์ ๋ฌธ์ ๋ docker-machine์ด ์ํ๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ ๊ฐ์ ธ์ฌ ์ ์๋ค๋ ๊ฒ์ ๋๋ค.
๋์ปค ๋จธ์ ํ๊ฒฝ์ด ๋ค์๊ณผ ๊ฐ์ด ์๋ํฉ๋๋ค.
% docker-machine --version
docker-machine version 0.4.0-rc1 (f6ea2c1)
(์ฐธ๊ณ -homebrew-cask์๋ ์์ง v0.3.0๋ณด๋ค ์ต์ ๋ฒ์ ์ด ์๊ธฐ ๋๋ฌธ์ ์๋์ผ๋ก ์ค์นํ์ต๋๋ค)
๊ทธ๋ฌ๋ '๋ง๋ค๊ธฐ'์์ docker-machine์ ์ฌ์ ํ โโ๋ฉ ์ท๊ณ 'docker-machine env docker-vm'์ด ์๋ํ๋๋ก ์์ ํ ์ป๊ธฐ ์ํด 'docker-vm'์ ๋ํ 'regenerate-certs'๊ฐ ํ์ํ์ต๋๋ค.
๋น์ทํ ๋ฌธ์ ๊ฐ์๋ ๋ค๋ฅธ ์ฌ๋์ ์ํด ๊ณต๊ฐํฉ๋๋ค. ์ ์ด๋ ๋๋ boot2docker๋ก ๋๋๋ฆด ํ์์์ด ํ์ฌ ์๋ํ๋ docker-machine ํ๊ฒฝ์ด ์์ต๋๋ค. ๊ทธ๋ฌ๋ ์ด๊ฒ์ ํ๋ฃจ ์ข ์ผ ๋ญ๋นํ์ต๋๋ค :(
@tehmaspc ๋น์ ๊ณผ ๊ฐ์ ๋ฌธ์ ์ด๋ฉฐ ํด๊ฒฐ์ฑ ์ ์ฐพ์ง ๋ชปํ์ต๋๋ค.
@tehmaspc ํผ๋๋ฐฑ์ ๊ฐ์ฌ ๋๋ฆฌ๋ฉฐ ๋ฌธ์ ์ ๋ํด ์ฃ์กํฉ๋๋ค :( ์ํ๊น๊ฒ๋ ์ด๋ ์ผ๋ฐ์ ์ผ๋ก ๋ฒ์ถ์ผ ๋ฐ์ค ๋คํธ์ํน ๋๋ฌธ์ ๋๋ค. v0.4.0-rc1์ด ์์ ๋ ํผ๋๋ฐฑ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค.
@opskumu 0.4.0-rc1์ ์ฌ์ฉํด ์ฃผ์๊ฒ ์ต๋๊น?
MacOS X Yosemite 0.4.0-rc1์์๋ ๋๊ฐ์ ํ์์ด ๋ํ๋ฉ๋๋ค.
docker-machine create --driver=virtualbox --virtualbox-disk-size "40000" local
No default boot2docker iso found locally, downloading the latest release...
Downloading https://s3.amazonaws.com/docker-mcn/public/b2d-next/boot2docker-virtualbox.iso to /Users/wmillerx/.docker/machine/cache/boot2docker-virtualbox.iso...
Creating VirtualBox VM...
Creating SSH key...
Starting VirtualBox VM...
Starting VM...
์์ํ ๋งค๋ฌ๋ ค ...
ํ๊ฒฝ ์ ๋ณด :
ProductName: Mac OS X
ProductVersion: 10.10.4
BuildVersion: 14E46
docker --version
Docker version 1.7.1, build 786b29d
docker-machine --version
docker-machine version 0.4.0-rc1 (f6ea2c1)
vboxmanage --version
5.0.0r101573
FWIW, ๋๋ 4.3.x VBOX๋ก ๋ค์ด ๊ทธ๋ ์ด๋ํ๊ณ ์ด๊ฒ์ ํต๊ณผํ๊ธฐ ์ํด cert ์ฌ์์ฑ ๋ช ๋ น์ ์ํํ์ต๋๋ค. ์๋ก์ด VM์ผ๋ก ์๋ํ์ญ์์ค. ํ์ด์ ๋น๋๋ค.
@opskumu @ wmiller848- ๋ฐฉ๊ธ์ด ๋ฌธ์ ๋ฅผ ๋ฐ๊ฒฌํ์ต๋๋ค : https://github.com/docker/machine/issues/1572
~ / .ssh / config ํ์ผ์์ SSH ๋ฉํฐํ๋ ์ฑ์ ์ฌ์ฉํฉ๋๋ค. ์ด ์ค์ ์ ๋นํ์ฑํํ๊ณ ๋์ปค ๋จธ์ ์ด ์ ๋๋ก ์๋ํ๋๋กํฉ๋๋ค. ์์ ํด๊ฒฐ ๋ฐฉ๋ฒ์กฐ์ฐจ๋ ์ค์ ๋ก ์ผ๊ด๋๊ฒ ์๋ํ์ง ์์์ง๋ง SSH ๋ฉํฐํ๋ ์ฑ์ด ๋นํ์ฑํ๋๋ฉด ์์ ๋ ๊ฒ ๊ฐ์ต๋๋ค.
์ฌ๋ฌ๋ถ์ด SSH ๋ฉํฐํ๋ ์ฑ์ ํ์ฑํํ๋์ง ๊ถ๊ธํ์ญ๋๊น ???
๋ด ~ / .ssh / config ํ์ผ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
% ๊ณ ์์ด ~ / .ssh / config ์ฃผ์ต์ * TCPKeepAlive ์ ServerAliveInterval 10 ServerAliveCountMax 10 ForwardAgent ์ # ControlMaster ์๋ # ControlPath ~/.ssh/sockets/%r@%h-%p # ControlPersist 300
๊ฑด๋ฐฐ,
ํ
๋ง ์คํ
SSH ๋ฉํฐํ๋ ์ฑ์ ๋นํ์ฑํํ๋ ๊ฒ๋ ์ ์๊ฒ๋ ํจ๊ณผ์ ์ด์์ต๋๋ค (OS X 10.10.4์์). @tehmaspc ๊ฐ์ฌํฉ๋๋ค!
@ehazlett ๋๋ ์ด๋ฏธ 0.4.0์ ํ ์คํธํ์ง๋ง ์๋ํ์ง ์์ต๋๋ค.
# docker-machine -v
docker-machine version 0.4.0 (9d0dc7a)
# cat /etc/centos-release
CentOS Linux release 7.1.1503 (Core)
@tehmaspc Diablling ssh ๋ฉํฐํ๋ ์ฑ์ด ์ ์๊ฒ๋ ์๋ํ์ง ์์ต๋๋ค.
docker-machine 0.4.0์ ์ฌ์ฉํ๋ Win10์๋ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
{ ~ } ยป docker-machine.0.4.0 ls ~ 1
NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Timeout
dev virtualbox Timeout
{ ~ } ยป docker-machine.0.3.1 ls ~ 127
NAME ACTIVE DRIVER STATE URL SWARM
default virtualbox Stopped
dev virtualbox Running tcp://192.168.99.102:2376
์ด๊ฒ์ด ๋์์ด๋๋์ง ํ์คํ์ง ์์ง๋ง ๋น์ทํ ๋ฌธ์ ์ ๋ฐ๋ผ ssh ํฌํธ๊ฐ ๋ด ์ปดํจํฐ์ ๊ตฌ์ฑ ํ์ผ ( ~/.docker/machine/machines/<machine_name>/config.json
)์ ์ค์ ๋์ง ์์ ๊ฒ์ ๋ฐ๊ฒฌํ์ต๋๋ค. ๊ฒฐ๊ณผ์ ์ผ๋ก docker-machine
๋ ํญ์ ํฌํธ 22์์ ssh๋ฅผ ์๋ํ์ต๋๋ค. ์๋์ผ๋ก ์ค์ ํ ํ ๋ชจ๋ ๊ฒ์ด ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค.
๊ทธ๋งํ ๊ฐ์น๋ฅผ ์ํด SSH ๊ตฌ์ฑ์์ ๋ฉํฐ ํ๋ ์ค ์ค์ ์ ์ ๊ฑฐํ๋ฉด์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค. ๋ค๋ฅธ ๊ณต๊ฐ ๋ ์ด์์์ ๋ด๊ฐ ์๋ํ ๋ค๋ฅธ ์ด๋ค ๊ฒ๋ ์๋ํ์ง ์์์ง๋ง ์ด์ ๋ชจ๋ ๊ฒ์ด ์ ์๋ํ๋ ๊ฒ์ฒ๋ผ ๋ณด์ ๋๋ค.
VM ์ค์ ์คํฌ๋ฆฝํธ๋ SSH -o
์ต์
์ ์ฌ์ฉํ์ฌ ์ฐ๊ฒฐํ ๋ ๋ฉํฐํ๋ ์ฑ์ ๋นํ์ฑํํ๋ ๊ฒ์ ๊ณ ๋ คํด์ผํ ๊น์?
@chrisfosterelli yup +1;
cc @ehazlett- ๋ง์ ์ฌ๋๋ค์ด์ด ๋ฌธ์ ๋ฅผ ๊ณ์
๊ฐ์ฌ,
๋ฟก๋ฟก
๋ฌธ์ ๋ ๋๋ฌด๋๋ ์ํ๊น๋ค. ๋ฌธ์ ๋ฅผ ์ํํ๊ธฐ ์ํด์ด ํ ๋ก ์ ์ผ๋ถ์ธ ๋ชจ๋ ์ฌ๋๊ณผ ํจ๊ป ์ ์ฌ์ ์ธ ์์ ์ฌํญ์ ํฌ๋ผ์ฐ๋ ์์ฑํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
ssh mutliplexing์ ์ ๊ฑฐํ๋ฉด์ด ๋ฌธ์ ๋ ํด๊ฒฐ๋์์ต๋๋ค.
๋๊ตฌ๋ ์ง ssh ๋ฉํฐํ๋ ์ฑ์ ๋นํ์ฑํํ๋ฉด Mac์ด ์๋ Linux์์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค. Ubuntu์์ ๋นํ์ฑํ ๋ ๋ฌธ์ ๊ฐ ์ฌ์ ํ ๋ํ๋ฉ๋๋ค. ์ฌ๋๋ค์ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ค๊ณ ๋งํ์ง๋ง Linux, Windows ๋๋ Mac์ ์ฃผ๋ชฉํ์ง ์์ต๋๋ค.
ssh ๋ฉํฐํ๋ ์ฑ์ด ์ผ์ ธ ์์ง ์์ง๋ง ์ฌ์ ํ์ด ๋ฌธ์ ๊ฐ ๋ํ๋ฉ๋๋ค.
@ wmiller848 :์ด ๋ฌธ์ ์ ๋ํ ํด๊ฒฐ์ฑ
์ ์ฐพ์์ต๋๊น?
๋ด ํ๊ฒฝ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
~ $ docker-๋ฒ์ ; docker-machine --version; VBoxManage-๋ฒ์
Docker ๋ฒ์ 1.9.0-dev, ๋น๋ 0e3674d, ์คํ์ฉ
docker-machine ๋ฒ์ 0.4.1 (e2c88d6)
5.0.0r101573
~ $ sw_vers
์ ํ๋ช
: Mac OS X
์ ํ ๋ฒ์ : 10.10.4
BuildVersion : 14E46
๋ค์๊ณผ ๊ฐ์ ์ค๋ฅ๋ ํ์๋ฉ๋๋ค.
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : exit status 255
๊ธฐ๋ณธ Docker Machine ์ค์น๋ฅผ ์ฌ์ฉํ๊ณ ์ด ํน์ ์ปดํจํฐ์ ์์ง ์ค์นํ์ง ์์์ผ๋ฏ๋ก VirtualBox๋ฅผ ์ค์นํ๋๋กํ์ต๋๋ค. ์ ์ฌ์ ์ผ๋ก ์ด์ํ ์ ์ผํ ๊ฒ์ ์๊ฒฉํ ์ํธํ ์๊ตฌ ์ฌํญ์ ๊ฐ์ง OpenSSH์ ํ๋ธ๋ฅ ๋ฒ์ ์ ๋๋ค. ๋ด ํ๊ฒฝ์ ๋ํ ์ธ๋ถ ์ ๋ณด๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F27
docker --version
Docker version 1.8.1, build d12ea79
docker-machine --version
docker-machine version 0.4.1 (e2c88d6)
vboxmanage --version
5.0.2r102096
ssh -V
OpenSSH_7.0p1, OpenSSL 1.0.2d 9 Jul 2015
cat ~/.ssh/config
#Defaults for all my hosts
Host *
AddressFamily inet
Ciphers [email protected],[email protected]
ForwardX11 no
ForwardX11Trusted no
KexAlgorithms [email protected]
MACs [email protected],[email protected],[email protected]
Protocol 2
VisualHostKey yes
HashKnownHosts yes
#host specific stuff..
๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
$ vboxmanage --version
5.0.2r102096
$ docker-machine --version
docker-machine version 0.4.1 (e2c88d6)
์ด์ ๋ ๋ชจ๋ฅด๊ฒ ์ง๋ง ๋ด ๋ฌธ์ ๋ ์์คํ ์ ๋ํ ์๋ชป๋ config.json์ ๋๋ค. ์ปดํจํฐ์ IP์ ํฌํธ๊ฐ ์์ต๋๋ค.
๋ํ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ ๋ ๋๊น์ง boot2docker๋ฅผ ์ฌ์ฉํ๊ณ ์์ต๋๋ค.
vboxmanage --version
4.3.14r95030
docker-machine -version
docker-machine version 0.4.1 (e2c88d6)
docker version
Client:
Version: 1.8.1
API version: 1.20
Go version: go1.4.2
Git commit: d12ea79
Built: Thu Aug 13 19:47:52 UTC 2015
OS/Arch: darwin/amd64
์ฌ๊ธฐ์๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
$ docker --version; docker-machine --version; VBoxManage --version; sw_vers 2.2.2 16:52
Docker version 1.8.1, build d12ea79
docker-machine version 0.4.1 (e2c88d6)
5.0.3r102322
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F27
๊ฐ์ฌ
์ฌ๊ธฐ์ ๊ฐ์ ๋ฌธ์ :
$ docker --version; docker-machine --version; VBoxManage --version; sw_vers
Docker version 1.8.1, build d12ea79
docker-machine version 0.4.1 (e2c88d6)
4.3.22r98236
ProductName: Mac OS X
ProductVersion: 10.10.5
BuildVersion: 14F27
VBox๋ฅผ 5.x์์ 4.3.x๋ก ๋ค์ด ๊ทธ๋ ์ด๋ํ๊ณ ๋ช ์๊ฐ ๋์ ์๋ ํ ๋ค์ ๋์ผํ SSH ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค.
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. ์ด ๋ฒ๊ทธ์ ๋ํ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ฐพ์์ต๋๋ค.
$ docker-machine --native-ssh create -d virtualbox test
๊ฐ์ฌํฉ๋๋ค @ecylmz. ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ํด +1ํ์ญ์์ค. ์ด ์ค๋ฅ๊ฐ ๊ณ์ ํ์๋์์ง๋ง ์ฑ๊ณต์ ์ผ๋ก ์์คํ ์ ์์ฑํ์ต๋๋ค.
STDERR : ์คํ ์ค : / usr / local / bin / VBoxManage modifyvm imc --natpf1 delete ssh
STDERR : VBoxManage : ์ค๋ฅ : ์ฝ๋ NS_ERROR_INVALID_ARG (0x80070057)-์๋ชป๋ ์ธ์ ๊ฐ (ํ์ฅ ์ ๋ณด๋ฅผ ์ฌ์ฉํ ์ ์์)
VBoxManage : ์ค๋ฅ : ์ปจํ ์คํธ : VBoxManageModifyVM.cpp ํ์ผ์ 1766 ํ์์ "RemoveRedirect (Bstr (ValueUnion.psz) .raw ())"
ํด๊ฒฐ ๋ฐฉ๋ฒ์ ๋ํด @ecylmz์ ๋ํ ๋ฐ์์ผ๋ฉฐ ์ ์๊ฒ๋ ํจ๊ณผ์ ์ด์์ต๋๋ค. ์ฃผ์ ํ ์ ์ docker-machine
๋ช
๋ น (์ docker-machine env vm_name
)๋ง๋ค docker-machine --native-ssh
์คํํด์ผํ๋ค๋ ๊ฒ์
๋๋ค.
Docker Toolbox 1.8.1c๋ก ์ ๊ทธ๋ ์ด๋ํด๋์ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์ง ์์๋ค๋ ์ ๋ ์ฃผ๋ชฉํ ๊ฐ์น๊ฐ ์์ต๋๋ค.
--native-ssh
ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ์ ์๊ฒ๋ ํจ๊ณผ์ ์ด์์ต๋๋ค.
--native-ssh
๊ฐ) ์ ์๊ฒ ํจ๊ณผ์ ์ด์์ต๋๋ค. : +1 : @ecylmz
์ฐธ๊ณ ๋ก, ์ด๋ฌํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ ์ด์ ๊ฐ SSH ๋ฉํฐํ๋ ์ฑ ๊ตฌ์ฑ ์ค์ ๋๋ฌธ์ด๋ผ๋ฉด ๋ค์ ๋ฆด๋ฆฌ์ค / ๋ง์คํฐ์์ ์์ ํด์ผํฉ๋๋ค.
@nathanleclaire SSH ๋ฉํฐํ๋ ์ฑ ์์ ์ ๋ํ ์
๋ฐ์ดํธ์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค. ์ข์ ์์! Linux (Ubuntu)์์ --native-ssh
์ ํ
์คํธํ์ต๋๋ค. ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์ง๋ ์์ต๋๋ค. ๋ค์ ๋งํ์ง๋ง, ๊ทธ๊ฒ์ ํํธ ์ค ๋ฏธ์ค์ด๋ฏ๋ก ํ ๋ฒ ์๋ํ๋ค๊ณ ํด์ ์๋ฌด ์๋ฏธ๊ฐ ์์ต๋๋ค. 10 ๋ฒ ์ฐ์ ์คํจํ ๋ค์ ๊ฐ์๊ธฐ ๋ช ๋ฒ ์๋ ํ ๋ค์ 10 ๋ฒ ์คํจํ๋๋ก ํ ์ ์์ต๋๋ค.
@garystafford Ubuntu ์์์ด --native-ssh
๊ฐ ๊ธฐ๋ณธ ๋๋ผ์ด๋ฒ (์์)์์ ์๋ํ์ง ์์์ ํ์ธํ ์ ์์ต๋๋ค.
+1
$ docker-machine -D --native-ssh create -d virtualbox local
๋ช
๋ น์ ์คํํ๋๋ฐ ์ค๋ฅ ๋ก๊ทธ์์ ์๋ํ์ง ์์์ต๋๋ค.
์คํ ์ค : / usr / bin / VBoxManage startvm local --type headless
STDOUT : VM "๋ก์ปฌ"์ ์ ์์ด ์ผ์ง ๋๊น์ง ๊ธฐ๋ค๋ฆฌ๋ ์ค ...
VM "๋ก์ปฌ"์ด ์ฑ๊ณต์ ์ผ๋ก ์์๋์์ต๋๋ค.
STDERR :
VM ์์ ์ค ...
WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ...
TCP ์ฐ๊ฒฐ ํ
์คํธ : localhost : 49564
SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ๊ธฐ๋ณธ
SSH ๋ช
๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค.
0 ๋ฒ ์ถ๊ตฌ
TCP ๋ค์ด์ผ๋ง ์ค๋ฅ : ssh : handshake failed : read tcp 127.0.0.1:49564 : connection reset by peer
TCP ๋ค์ด์ผ๋ง ์ค๋ฅ : ssh : handshake failed : read tcp 127.0.0.1:49564 : connection reset by peer
@nathanleclaire , ๋ฐฉ๊ธ Ubuntu ๋๋ Fedora ์ฉ GitHub์ ๋ง์คํฐ ๋ธ๋์น์์ ์ต์ ๋์ปค ๋จธ์ ์ ๋ณต์ ํ๊ณ ๋น๋ํ์ต๋๋ค. Ubuntu ๋๋ Fedora์ ssh ์ค๋ฅ์ ๋ํ ๊ฐ์ ์ฌํญ์ด ์ฌ์ ํ ํ์๋์ง ์์ต๋๋ค.
gstafford@gstafford-X555LA:$ docker-machine -v
docker-machine version 0.5.0-dev (fe5a722)
@nathanleclaire ์ธ๊ธ ํ ์ถ๊ฐ ํธ์คํธ ์ ์ฉ ๋คํธ์ํฌ ์ด๋ํฐ๋ฅผ ์ญ์ ํ์ฌ 80 % ์ด์์ ์ปดํจํฐ ์์ฑ ๋ฐ / ๋๋ IP ์ฃผ์ ์ถฉ๋ ์คํจ์์ 100 % ์ฑ๊ณต์ผ๋ก๊ฐ์ต๋๋ค. VirtualBox 5.0.3์์ VirtualBox-> ํ๊ฒฝ ์ค์ -> ๋คํธ์ํฌ-> ํธ์คํธ ์ ์ฉ ๋คํธ์ํฌ๋ก ์ด๋ํ์ฌ ์ ๊ฑฐํ์ต๋๋ค. ๊ทธ ํ 5 ๊ฐ ๊ตฐ์ง ๋ผ๋ฅผ ๋ง๋ค๊ณ ๋ช
๋ฐฑํ ์ค๋ฅ๋ ๋ฌธ์ ์์ด weave๋ฅผ ์ถ๊ฐํ์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค. ์ฐธ๊ณ ๋ก, ๋ณต์ ๋ฐ ๊ตฌ์ถ ํ docker-machine version 0.5.0-dev (fe5a722)
๋ฒ์ ์ ์์ง ์คํ ์ค์
๋๋ค.
@garystafford ๋น์ ์ ์ํด ์ ๋ฆฌ๋์๋ค
๋ด ๋ฌธ์ ๋ ๋ ๊ฐ์ง ์ธ ๊ฒ ๊ฐ์ต๋๋ค. ์ด๋ํฐ vmnet0 ๋ฐ vmnet1์ ์ ๊ฑฐํด์ผ ํ ๋ฟ๋ง ์๋๋ผ ๋ชจ๋ docker-machine ๋ช ๋ น์๋ sudo๊ฐ ํ์ํฉ๋๋ค.
๋ด ํ๊ฒฝ์์ ์ด๊ฒ์ ๊ฐ์ ์์ ๋คํธ์ํฌ ๋ฌธ์ ์
๋๋ค. ๋๋ํด์ผํ๋ค
(1) ํธ์คํธ ์ ์ฉ ์ด๋ํฐ๋ฅผ ๋ธ๋ฆฌ์ง ์ด๋ํฐ (en0 Wi-Fi)๋ก ๋ณ๊ฒฝํฉ๋๋ค.
๊ทธ๋ฐ ๋ค์ docker @๋ฅผ ssh ํ ์ ์์ต๋๋ค
(2) docker-machine regenerate-certs
๊ทธ๋ฐ ๋ค์ 'docker-machine config'๊ฐ ์๋ํฉ๋๋ค.
๋๊ฐ์ ์ค๋ฅ๊ฐ ๋ฐ์ํ์ง๋ง BIOS์์ " ๊ฐ์ํ ํ์ฑํ "๋ฅผ
๊ด๋ จ๋ ๋ฌธ์ ํด๊ฒฐ :
docker-machine --debug create --driver virtualbox dev
๋ด ๋ฌธ์ ํด๊ฒฐ, ํนํ VirtualBox Manager ๋ด์์ ์คํ์ค์ธ vm์ "๋๋ธ ํด๋ฆญ"ํ๋ ๋ถ๋ถ์ ๊ณต์ ํ๊ณ ์ถ์์ต๋๋ค. ์ด๊ฒ์ ์๋ํ๋ฉด ๋๊น์ ๊ทผ๋ณธ ์์ธ์ด ๋ฌด์์ธ์ง์ ๋ํ ํํธ๋ฅผ ์ป์ ์ ์์ต๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ์ผ๋ก "~ / .ssh / config"์์ Host * ... ControlMaster auto
์ (๋ฅผ) ์ํ๋ฉด ๋ค์๊ณผ ๊ฐ์ด ํ ์ ์์ต๋๋ค.
# Docker: docker-machine (at least for virtualbox) breaks if ControlMaster
# is used. See:
# https://github.com/docker/machine/issues/1591#issuecomment-126169020
# This block needs to be before any global "Host *" using ControlMaster.
Host localhost
ControlMaster no
Host *
ControlMaster auto
ControlPath ~/.ssh/socket-%r@%h:%p
ControlPersist yes
# ...
์ต์ RC๋ SSH ๊ตฌ์ฑ์ ์ค์ ๋ ControlMaster
์ต์
์ผ๋ก ์ ์๋ํฉ๋๋ค.
๋์ปค ๋จธ์ -v
docker-machine ๋ฒ์ 0.4.1 (e2c88d6)
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ์ ๋ชจ๋ docker-machine ๋ช
๋ น์ --native-ssh๋ฅผ ์ถ๊ฐํ๋ ๊ฒ์
๋๋ค.
MacOS 10.11.1์์๋์ด ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
--native-ssh๋ฅผ ์ฌ์ฉํ๋ฉด ์ค์ ๋ก ๋์์ด๋ฉ๋๋ค.
~ / .ssh / config ์์๋์์ต๋๋ค. ์์ ํ๋ฉด ์์ ์ฒ๋ผ ๊ธฐ๊ณ๋ฅผ ๋ง๋ค ์์์์ต๋๋ค. ์ด๋ฅผ ํ์ธํ๋ ํ ๊ฐ์ง ๋ฐฉ๋ฒ์ ๋ค๋ฅธ ์๋ฒ์ ssh๋ฅผ ์๋ํ๊ณ ssh๋ก ์ธํด docker-machine์ด ์คํจํ์ง ์๋์ง ํ์ธํ๋ ๊ฒ์ ๋๋ค.
๊ฐ์ ๋ฌธ์ ๊ฐ ์๊ณ ์๋ฌด๊ฒ๋ ์๋ํ์ง ์์์ต๋๋ค.
๋์๊ฒ ์ ์ผํ ํด๊ฒฐ์ฑ
์ ๊ฐ ์์คํ
์ --native-ssh๋ฅผ ์ถ๊ฐํ๋ ๊ฒ์
๋๋ค.
๋ด ํ๊ฒฝ ์ธ๋ถ ์ ๋ณด :
์ด์์ฒด์ : OS X El Capitan Version 10.11
docker-machine ๋ฒ์ 0.5.0 (04cfa58)
VBoxManage-๋ฒ์
5.0.8r103449
@tehmaspc https://github.com/docker/machine/issues/1591#issuecomment -126169020 @trentm์ด ์ ์ํ ๋ช ๊ฐ์ง ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ๋์ ํจ๊ป ์๋ํฉ๋๋ค.
Docker ์ค์น๋ฅผ ์ฝ๊ฐ ์
๊ทธ๋ ์ด๋ ํ ํ ์ค๋ Windows 10์์ ์ด๊ฒ์ ๋ง๋ฌ์ต๋๋ค. .docker
์ ๊ฑฐ, VBox VM ์ฌ ๊ตฌ์ถ, ํ๊ฒฝ ๋ณ์ ์กฐ์, config.json
ํดํน ๋ฑ ๋ชจ๋ ๊ฒ์ ์๋ํ์ต๋๋ค. ์๋ํ์ต๋๋ค!
์ ๊ทธ๋ ์ด๋ ๊ณผ์ ์์ ๋ฐ์ํ๋ VBox ๋คํธ์ํฌ์ ๋ฌธ์ ๊ฐ์๋ ๊ฒ ๊ฐ์์ต๋๋ค. ์์ ํ IP ์ฃผ์๊ฐ ์ทจํด์ก๊ณ ๊ทธ ํ ๋ชจ๋ ํญ๋ฐํ์ต๋๋ค.
๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์๋ค. ๋ถ๋ช ํ ์ด์ ์ OpenSSH๊ฐ ์ค์น๋์ด ์์๊ณ ControlMaster ์ค๋ฅ๋ฅผ ์ผ์ผํค๋ ๋์ปค ์ด๋ฏธ์ง๋ฅผ ๋ง๋๋ ๋์ ๊ฐ์ ธ๊ฐ์ต๋๋ค. ๋๋ ๊ทธ๊ฒ์ ์ ๊ฑฐํ๊ณ Gitbin์ ๊ฒฝ๋ก์ ์ถ๊ฐํ์ผ๋ฉฐ ๋งค๋ ฅ์ฒ๋ผ ์๋ํ์ต๋๋ค.
๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ๊ณ ์์ผ๋ฉฐ์ด ํ์ด์ง์์ ์ ์ ๋ ํด๊ฒฐ ๋ฐฉ๋ฒ์ด ํจ๊ณผ๊ฐ ์์ต๋๋ค. ์ด๋ค ์์ด๋์ด?
๋ด ํ๊ฒฝ์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
Docker ๋ฒ์ 1.10.3, ๋น๋ 20f81dd
docker-machine ๋ฒ์ 0.6.0, ๋น๋ e27fb87
5.0.16r105871
์ ํ๋ช
: Mac OS X
์ ํ ๋ฒ์ : 10.11.4
BuildVersion : 15E65
์ด ๋ช ๋ น์ ์คํํ ๋ :
docker-machine --debug create -d virtualbox default
... ํญ์์ด ์ค๋ฅ๊ฐ ๋ฐ์ํ๋ฉด ์๋์ผ๋ก ์ค๋จ ํ ๋๊น์ง ํฐ๋ฏธ๋์ ๋ฐ๋ณต์ ์ผ๋ก ์ธ์๋ฉ๋๋ค.
(๊ธฐ๋ณธ๊ฐ) DBG | WaitForSSH ํจ์๋ก๊ฐ๋ ์ค ...
(๊ธฐ๋ณธ๊ฐ) DBG | SSH ํด๋ผ์ด์ธํธ ์ ํ ์ฌ์ฉ : ์ธ๋ถ
(๊ธฐ๋ณธ๊ฐ) DBG | {[-o BatchMode = yes -o PasswordAuthentication = no -o StrictHostKeyChecking = no -o UserKnownHostsFile = / dev / null -o LogLevel = quiet -o ConnectionAttempts = 3 -o ConnectTimeout = 10 -o ControlMaster = no -o ControlPath = none [email protected] -o IdentitiesOnly = yes -i /Users/cbenson/.docker/machine/machines/default/id_rsa -p 53332] / usr / local / bin / ssh}
(๊ธฐ๋ณธ๊ฐ) DBG | SSH ๋ช
๋ น์ ์คํํ๋ ค๊ณ ํฉ๋๋ค.
(๊ธฐ๋ณธ๊ฐ) DBG | 0 ๋ฒ ์ถ๊ตฌ
(๊ธฐ๋ณธ๊ฐ) DBG | SSH cmd ์ค๋ฅ, ์ถ๋ ฅ : ์ข
๋ฃ ์ํ 255 :
(๊ธฐ๋ณธ๊ฐ) DBG | ssh ๋ช
๋ น 'exit 0'๊ฐ์ ธ ์ค๊ธฐ ์ค๋ฅ : SSH ๋ช
๋ น์ ์คํํ๋ ์ค์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ต๋๋ค!
(๊ธฐ๋ณธ๊ฐ) DBG | ๋ช
๋ น : ์ถ๊ตฌ 0
(๊ธฐ๋ณธ๊ฐ) DBG | ์ค๋ฅ : ์ข
๋ฃ ์ํ 255
(๊ธฐ๋ณธ๊ฐ) DBG | ์ถ๋ ฅ :
@nathanleclaire ์์ ๋ด ์๊ฒฌ์ ๋ณผ ์ ์์ต๋๊น? ์ ๋ Mac El Cap์ ์ฌ์ฉํ๊ณ ์์ผ๋ฉฐ Docker, Docker Machine, VirtualBox, OS ์ ๋ฐ์ดํธ ๋ฑ ๋ด๊ฐ ์ฌ์ฉํ๋ ๋ชจ๋ ๊ฒ์ด ์ต์ ๋ฒ์ ์ ๋๋ค. ์ด ํ์ด์ง ๋๋ ๊ด๋ จ ๋ฌธ์ ํ์ด์ง์์ ์ ์ฌ์ ์ธ ์์ ์ฌํญ์ผ๋ก ํ์ธํ ๊ฒ์ ์๋ํ์ง ์์์ต๋๋ค. ๋ด๊ฐ ๊ฐ์ง๊ณ ์๋ ๋ ๊ฐ์ ์ ์ฌํ๊ฒ ๊ตฌ์ฑ๋ Mac์ ์ํฅ์ ๋ฏธ์น๊ธฐ ๋๋ฌธ์ ๋ด ๊ตฌ์ฑ์ ๊ดํ ๊ฒ ๊ฐ์ต๋๋ค. ์ต์ Docker, Docker Machine, OpenSSH ๋ฐ OpenSSL์ Homebrew๋ฅผ ์ฌ์ฉํฉ๋๋ค. ์์ฒด ๋ฐ์ด๋๋ฆฌ์์ VirtualBox๋ฅผ ์ค์นํ์ง๋ง ์ด์ ์ Homebrew๋ฅผ ํตํด ์ค์นํด ๋ณด์์ต๋๋ค (ํ์ฌ๋ ์๋). ์ด๋ค ์์ด๋์ด? ๊ฐ์ฌ!
์์ง EL Cap์ด ์์ด์ ํด๋น OS์ ๋ํ ๊ฒฝํ์ ๊ณต์ ํ ์ ์์ต๋๋ค.
๋์์ Virtualbox ์๊ตฌ ์ฌํญ์ ์์ ํ ์ ๊ฑฐํ๋ Docker for Mac ๋ฒ ํ์ ๋ค์ด๊ฐ๋ ๊ฒ์ ๋๋ค. ๋ฌผ๋ก ๋ค๋ฅธ ๋ฌธ์ ๊ฐ์์ ์ ์์ต๋๋ค. :)
https://blog.docker.com/2016/03/docker-for-mac-windows-beta/
@chrisbenson ~/.ssh/config
ํ์ผ์ ์ด๋ค๊ฐ์?
docker-machine ssh default -vvv
์ ๊ฒฐ๊ณผ๋ ๋ฌด์์
๋๊น?
@nathanleclaire ๋ต๋ณ ์ด ์ง์ฐ๋์ด ์ฃ์กํฉ๋๋ค. ๋๋ ์ผ์์ ์ผ๋ก ํฌ๊ธฐํ๊ณ ๋นจ๋ฆฌ ํ์ธํ์ง ์์์ต๋๋ค. ์์ผ๋ก ๊ทํ์ ๋ต๋ณ์ ๊ธฐ๋ค๋ฆฌ๊ฒ ์ต๋๋ค.
~/.ssh/config
๊ฐ ์๋๋๋ค. ์ค์ ๋ก ๊ทธ๊ฒ์ด ์๋์ง ํ์ธํ๊ธฐ ์ํด ์ ๊ฒ์ ์ญ์ ํ๊ธฐ ๋๋ฌธ์
๋๋ค. ํจ๊ณผ๊ฐ ์์์ต๋๋ค.
docker-machine --debug create -d virtualbox default
์คํ ํ ํ ๋ฐ๋ณตํด์ ์ธ๊ธ ๋ ์ค๋ฅ๋ฅผ ์์ฑ ํ ๋ค์ Ctrl + C๋ฅผ ์ฌ์ฉํฉ๋๋ค.
๊ทธ๋ฐ ๋ค์ docker-machine ssh default -vvv
๋ฅผ ์
๋ ฅํ๊ณ ๋ค์์ ์ป์ต๋๋ค.
OpenSSH_7.2p2, OpenSSL 1.0.2g 2016 ๋
3 ์ 1 ์ผ
debug1 : ๊ตฌ์ฑ ๋ฐ์ดํฐ ์ฝ๊ธฐ / usr / local / etc / ssh / ssh_config
debug2 : "127.0.0.1"ํฌํธ 22 ํด๊ฒฐ
debug2 : ssh_connect_direct : needpriv 0
debug1 : 127.0.0.1 [127.0.0.1] ํฌํธ 22์ ์ฐ๊ฒฐํฉ๋๋ค.
debug2 : fd 3 ์ค์ O_NONBLOCK
debug1 : ์ฃผ์ 127.0.0.1 ํฌํธ 22์ ์ฐ๊ฒฐ : ์ฐ๊ฒฐ ๊ฑฐ๋ถ
debug1 : ๋ค์ ์๋ ์ค ...
debug1 : 127.0.0.1 [127.0.0.1] ํฌํธ 22์ ์ฐ๊ฒฐํฉ๋๋ค.
debug2 : fd 3 ์ค์ O_NONBLOCK
debug1 : ์ฃผ์ 127.0.0.1 ํฌํธ 22์ ์ฐ๊ฒฐ : ์ฐ๊ฒฐ ๊ฑฐ๋ถ
debug1 : ๋ค์ ์๋ ์ค ...
debug1 : 127.0.0.1 [127.0.0.1] ํฌํธ 22์ ์ฐ๊ฒฐํฉ๋๋ค.
debug2 : fd 3 ์ค์ O_NONBLOCK
debug1 : ์ฃผ์ 127.0.0.1 ํฌํธ 22์ ์ฐ๊ฒฐ : ์ฐ๊ฒฐ ๊ฑฐ๋ถ
ssh : ํธ์คํธ์ ์ฐ๊ฒฐ 127.0.0.1 ํฌํธ 22 : ์ฐ๊ฒฐ์ด ๊ฑฐ๋ถ๋์์ต๋๋ค.
์ข
๋ฃ ์ํ 255
@chrisbenson /usr/local/etc/ssh/ssh_config
์ ๋ด์ฉ์ ๋ฌด์์
๋๊น?
@nathanleclaire ๋ค์์ 'cat / usr / local / etc / ssh / ssh_config'์ ๊ฒฐ๊ณผ์ ๋๋ค.
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# RhostsRSAAuthentication no
# RSAAuthentication yes
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/identity
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# Port 22
# Protocol 2,1
# Cipher 3des
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
ํ , ์๊ฒ ์ต๋๋ค. ์๋ฌด๊ฒ๋ ์ค์ ๋์ง ์์์ต๋๋ค. 0.7.0 ๋ฆด๋ฆฌ์ค๋ฅผ ์ฌ์ฉํด ๋ ๋์ ์๊ธ์ ํ์ธํ์ค ์ ์์ต๋๊น? (์๋ก์ด ๊ธฐ๋ฅ์ด๋ฏ๋ก Toolbox๊ฐ ์์ง ๊ตฌ์์ง์ง ์์์ผ๋ฏ๋ก ๋ฐ์ด๋๋ฆฌ๋ฅผ ๋ค์ด๋ก๋ํด์ผํฉ๋๋ค)
@nathanleclaire 0.7.0 ์ ์๋ํ์ง๋ง ์ฐจ์ด๊ฐ ์์์ต๋๋ค. ์ ํํ ๋์ผํ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ๋ค๋ฅธ ์์ด๋์ด๊ฐ ์์ต๋๊น? ๊ฐ์ฌ!
@chrisbenson --native-ssh
์๋ํฉ๋๊น, ์๋๋ฉด ๋์ผํ ๋ฌธ์ ๊ฐ ์์ต๋๊น?
@nathanleclaire ๋๋จ ๊ฐ์ ๋ฌธ์ ๋ฅผ ์ ์ํ๊ณ ์์ต๋๋ค.
@chrisbenson ๋ฐฉํ๋ฒฝ / VPN / ํ๋ก์๊ฐ ์ผ์ ธ ์์ต๋๊น?
@nathanleclaire ์๋จ, ์๋ฌด๊ฒ๋ ์๋๋๋ค. ์ ๋ El Capitan์ ์คํํ๋ ์์ ํ ์ ๋ฐ์ดํธ ๋ ์ต์ MacBook Pro๋ฅผ ์์ ์ค์ ๋๋ค. ๋ค์ด๋ก๋ ๋ฐ์ด๋๋ฆฌ๋ฅผ ์ฌ์ฉํ์ฌ VirtualBox๋ฅผ ์ค์น ํ ๊ฒ์ ์ ์ธํ๊ณ ๋ Homebrew๋ก ๋ชจ๋ ํญ๋ชฉ (Docker, Docker Machine, OpenSSL, OpenSSH)์ ์ ๋ฐ์ดํธํฉ๋๋ค. ๋ด ์ค์ ์ ๋ํด ์ฃผ๋ชฉํ ๋งํ ๊ฒ์ด ์๊ธฐ ๋๋ฌธ์ ๋์ฒํ ๊ฒ์ ๋๋ค.
@chrisbenson ๋ช ๊ฐ์ง ์๋ํด๋ณด์ญ์์ค.
22
)๋ฅผ ๋ณด๋ฉด SSH์ ์๋์ผ๋ก ์ฐ๊ฒฐํ ์ ์์ต๋๊น? (์ : ssh [email protected] -p 34567
-๋น๋ฐ๋ฒํธ๋ tcuser
)ping 127.0.0.1
์๋ํฉ๋๊น?~/.docker/machine/machines/default/default
๋ด๋ถ์ ์ค์ฒฉ ๋จ)๋ฅผ ์ดํด๋ณด๊ณ ํฅ๋ฏธ๋ก์ด ๊ฒ์ด ์๋์ง ํ์ธํ์ญ์์ค (์ : ์ค๋ฅ).127.0.0.1
๊ฐ ๊ธฐ๋ณธ ๋ฃจํ๋ฐฑ์
๋๋ค. ๋ง์ฃ ? /etc/hosts
ํ์ผ์ ์ด๋ป๊ฒ ์๊ฒผ์ต๋๊น?--native-ssh๊ฐ ์ ์๊ฒ ํจ๊ณผ์ ์ด์ง๋ง OS X์์ ์ ํฐ๋ฏธ๋ ์ธ์ ์ ์์ํ ๋๋ง๋ค์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค. ํ๋ก๋์ ์์ ๋์ปค ๋จธ์ ์ ๋ฌธ์ ๊ฐ ์์์ง๋ง ๊ณง ์ถ์ ๋ Mac ์ฉ Docker๊ฐ ์ด๋ฌํ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
์ด๊ฒ์ Windows 7, ์ต์ ๋์ปค ๋๊ตฌ ์์์์ PC๋ฅผ ๋ฐค์ ์ ์ ๊ฒ ํ ๋ ๋ฐ์ํฉ๋๋ค. PC๋ฅผ ๊นจ์ฐ๋ฉด ๋ชจ๋ docker-machine ๋ช ๋ น์ด ์๊ฐ ์ด๊ณผ๋์ง๋ง docker-machine ssh $ node๋ ๊ด์ฐฎ์ต๋๋ค. ๋ ธ๋ ๋ด๋ถ์์๋ ์ปค๊ฐ ์ ์์ ์ผ๋ก ์คํ๋๊ณ ์ ๋ ์์ํ ์ปจํ ์ด๋๊ฐ ์ฌ์ ํ ์คํ ์ค์ ๋๋ค.
$ docker -v && docker-machine -v
Docker ๋ฒ์ 1.12.0, ๋น๋ 8eab29e
docker-machine.exe ๋ฒ์ 0.8.0, ๋น๋ b85aac1
$ docker-machine env
$ docker-machine regenerate-certs [๋จธ์ ์ด๋ฆ]
$ docker-machine ls
ํ์ธ!
์์ฐ 3 ๋ ํ WIN7x64์์ ์ด๊ฑด ์ฌ์ ํ ์ผ์ด๋๊ณ ์์ต๋๋ค !!! ์ด๋ก ์ธํด ๊ฐ๋จํ ์ฒซ ๋ฒ์งธ ๊ธฐ๋ณธ ์์ฑ ๋ช ๋ น์ ์คํํ๋ ๊ฒ์ด ๋ถ๊ฐ๋ฅํ ๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๊ฑฐ๋ ์ ํ์ด ๊ณ ์ฅ๋ ์ ํ์ ํธ์ถ ํ ๋๊ฐ ์๋๋๊น?
(default) DBG | About to run SSH command:
(default) DBG | exit 0
(default) DBG | SSH cmd err, output: exit status 255:
(default) DBG | Error getting ssh command 'exit 0' : ssh command error:
(default) DBG | command : exit 0
(default) DBG | err : exit status 255
๋ถํํ๋ ๋๋ ๊ฐ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค. Google์ ๋ชจ๋ ๋งํฌ๋ฅผ ์ฝ์์ผ๋ฉฐ ์๋ฌด๊ฒ๋ ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ ์ ์์ต๋๋ค. ๋์์ฃผ์ธ์!
DigitalOcean ๋ฌผ๋ฐฉ์ธ๊ณผ ๊ฐ์ VPS ๋ด๋ถ์ ๊ธฐ๊ณ๋ฅผ ๋ง๋๋ ๊ฒ์ด ๋ง์ต๋๊น? ์ด๋ฌํ ์๋ฒ์ ๋ฌธ์ ๊ฐ ์์ต๋๋ค.
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
# docker -v
Docker version 18.06.1-ce, build e68fc7a
# docker-machine -v
docker-machine version 0.15.0, build b48dc28d
# VBoxManage --version
5.2.10_Ubuntur121806
# docker-machine --debug create --driver virtualbox mymachine
...
(mymachine) Waiting for an IP...
(mymachine) DBG | STDOUT:
(mymachine) DBG | {
(mymachine) DBG | Waiting for VM "mymachine" to power on...
(mymachine) DBG | VM "mymachine" has been successfully started.
(mymachine) DBG | }
(mymachine) DBG | STDERR:
(mymachine) DBG | {
(mymachine) DBG | }
(mymachine) DBG | Checking vm logs: /root/.docker/machine/machines/mymachine/mymachine/Logs/VBox.log
(mymachine) DBG | Getting to WaitForSSH function...
(mymachine) DBG | Using SSH client type: external
(mymachine) DBG | Using SSH private key: /root/.docker/machine/machines/mymachine/id_rsa (-rw-------)
(mymachine) DBG | &{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] -o IdentitiesOnly=yes -i /root/.docker/machine/machines/mymachine/id_rsa -p 44643] /usr/bin/ssh <nil>}
(mymachine) DBG | About to run SSH command:
(mymachine) DBG | exit 0
# And then many times:
(mymachine) DBG | SSH cmd err, output: exit status 255:
(mymachine) DBG | Error getting ssh command 'exit 0' : ssh command error:
(mymachine) DBG | command : exit 0
(mymachine) DBG | err : exit status 255
(mymachine) DBG | output :
(mymachine) DBG | Getting to WaitForSSH function...
(mymachine) DBG | Using SSH client type: external
(mymachine) DBG | Using SSH private key: /root/.docker/machine/machines/mymachine/id_rsa (-rw-------)
(mymachine) DBG | &{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] -o IdentitiesOnly=yes -i /root/.docker/machine/machines/mymachine/id_rsa -p 44643] /usr/bin/ssh <nil>}
(mymachine) DBG | About to run SSH command:
(mymachine) DBG | exit 0
ssh ๊ตฌ์ฑ ๋ง๋ค๊ธฐ๋ฅผ ์๋ํ์ต๋๋ค.
# cat ~/.ssh/config
Host *
TCPKeepAlive yes
ServerAliveInterval 10
ServerAliveCountMax 10
ForwardAgent yes
ControlMaster no
--native-ssh
์ฌ์ฉํ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์ง ์์ต๋๋ค.
@tenorok DO์์ VirtualBox ๋จธ์ ์ ๋ง๋ค๋ ค๊ณ ์๋ํ๋ ๋๋ถ๋ถ์ ํด๋ผ์ฐ๋ ๊ณต๊ธ์์์๋ ๊ฐ์ํ๋ฅผ ์ค์ฒฉ ํ ์ ์์ต๋๋ค.
๋๋ ๋๊ตฌ ์์๋ฅผ ์ฌ์ฉํด ๋ณด์๊ณ cmd ๋ฐ ๊ธฐ๋ณธ ssh (windows oponssl)๋ฅผ ์ฌ์ฉํ ๋ ๋์ผํ ๋ฌธ์ ๋ฅผ ๋ง๋ฌ์ต๋๋ค.
git / usr / bin / ssh์์ ssh๋ฅผ tringํ์ฌ์ด ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ์ต๋๋ค.
2020 ๋ ์์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํฉ๋๋ค.
&{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] -p 22] /usr/local/bin/ssh <nil>}
About to run SSH command:
exit 0
SSH cmd err, output: exit status 255:
Error getting ssh command 'exit 0' : ssh command error:
command : exit 0
err : exit status 255
output :
Getting to WaitForSSH function...
(dvc1) Calling .GetSSHHostname
(dvc1) Calling .GetSSHPort
(dvc1) Calling .GetSSHKeyPath
(dvc1) Calling .GetSSHUsername
Using SSH client type: external
&{[-F /dev/null -o ConnectionAttempts=3 -o ConnectTimeout=10 -o ControlMaster=no -o ControlPath=none -o LogLevel=quiet -o PasswordAuthentication=no -o ServerAliveInterval=60 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected] -p 22] /usr/local/bin/ssh <nil>}
About to run SSH command:
exit 0
โ dogvscat git:(master) โ docker-machine -v
docker-machine version 0.16.2, build bd45ab1
โ dogvscat git:(master) โ docker version
Client: Docker Engine - Community
Version: 19.03.8