File tree Expand file tree Collapse file tree 1 file changed +2
-28
lines changed Expand file tree Collapse file tree 1 file changed +2
-28
lines changed Original file line number Diff line number Diff line change @@ -76,38 +76,12 @@ docker-machine kill default
7676
7777### Docker tricks
7878
79- ##### SSH into docker container
79+ ##### Get into docker container
8080
8181``` bash
82- ssh -p 2022 root@localhost # with password `root`
82+ docker exec -ti imagetest /bin/bash
8383```
8484
85- If you got this error:
86-
87- ```
88- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
89- @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
90- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
91- IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
92- Someone could be eavesdropping on you right now (man-in-the-middle attack)!
93- It is also possible that a host key has just been changed.
94- The fingerprint for the ECDSA key sent by the remote host is
95- dd:1e:e0:95:8d:ef:06:b8:0f:2f.
96- Please contact your system administrator.
97- Add correct host key in /home/jh/.ssh/known_hosts to get rid of this message.
98- Offending ECDSA key in /home/jh/.ssh/known_hosts:104
99- remove with: ssh-keygen -f "/home/jh/.ssh/known_hosts" -R [localhost]:2022
100- ECDSA host key for [localhost]:2022 has changed and you have requested strict checking.
101- Host key verification failed.
102- ```
103- simply run
104-
105- ``` bash
106- ssh-keygen -f " ${HOME} /.ssh/known_hosts" -R [localhost]:2022
107- ```
108-
109- to remove host information.
110-
11185##### List docker machines
11286
11387``` bash
You can’t perform that action at this time.
0 commit comments