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
76
76
77
77
### Docker tricks
78
78
79
- ##### SSH into docker container
79
+ ##### Get into docker container
80
80
81
81
``` bash
82
- ssh -p 2022 root@localhost # with password `root`
82
+ docker exec -ti imagetest /bin/bash
83
83
```
84
84
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
-
111
85
##### List docker machines
112
86
113
87
``` bash
You can’t perform that action at this time.
0 commit comments