Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to login with docker mode #158

Open
wushuzh opened this issue Nov 24, 2020 · 2 comments
Open

how to login with docker mode #158

wushuzh opened this issue Nov 24, 2020 · 2 comments

Comments

@wushuzh
Copy link

wushuzh commented Nov 24, 2020

Hello,

I tried to launch fake-switches in docker mode. But there is an error when I tried to login. Anything (ssh-key?) I should do or config ?

$  docker run -P -d internap/fake-switches
Unable to find image 'internap/fake-switches:latest' locally
latest: Pulling from internap/fake-switches
cd784148e348: Pull complete 
30f71ecab593: Pull complete 
ed606575a835: Pull complete 
9c862b3c365f: Pull complete 
25e4e14c6ee4: Pull complete 
bafad17a0e15: Pull complete 
c999bb1053bf: Pull complete 
615fd324a25d: Pull complete 
e16121dcab90: Pull complete 
ddbd904a78ad: Pull complete 
Digest: sha256:4c250a055173f292c1cd8b2cde2d9644f81a0d0eb4e3efc980f793f0ed12692f
Status: Downloaded newer image for internap/fake-switches:latest
ef26a2ddd08291631dc95186d3703e241b8662e904e9d6b7bb3c664e10c23204
[wushuzh@veronica ~]$ docker ps
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                   NAMES
ef26a2ddd082        internap/fake-switches   "/bin/sh -c 'fake-sw…"   5 seconds ago       Up 2 seconds        0.0.0.0:32768->22/tcp   pedantic_sammet

I am using minikube for my docker env, so I am using vm ip (not 127.0.0.1)

eval $(minikube -p minikube docker-env)
$ minikube ip 
192.168.39.218

The error msg when I try to login the container.

$ ssh 192.168.39.218 -p 32768 -l root
Unable to negotiate with 192.168.39.218 port 32768: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1

@wushuzh wushuzh changed the title how to setup ssh key with docker mode how to login with docker mode Nov 24, 2020
@wushuzh
Copy link
Author

wushuzh commented Nov 24, 2020

If I login VM and ssh from there, I can do ssh connection successfully.

Anything I should do if I want to login from my VM host PC ?

$ minikube ssh
                         _             _            
            _         _ ( )           ( )           
  ___ ___  (_)  ___  (_)| |/')  _   _ | |_      __  
/' _ ` _ `\| |/' _ `\| || , <  ( ) ( )| '_`\  /'__`\
| ( ) ( ) || || ( ) || || |\`\ | (_) || |_) )(  ___/
(_) (_) (_)(_)(_) (_)(_)(_) (_)`\___/'(_,__/'`\____)

$ docker ps | head -2
CONTAINER ID        IMAGE                    COMMAND                  CREATED             STATUS              PORTS                   NAMES
ef26a2ddd082        internap/fake-switches   "/bin/sh -c 'fake-sw…"   2 hours ago         Up 2 hours          0.0.0.0:32768->22/tcp   pedantic_sammet
$ ssh root@127.0.0.1 -p 32768
root@127.0.0.1's password: 
switch>

@fbouliane
Copy link
Contributor

fake-switches seems to offer an old ssh cipher that has been deprecated,
we'll try to take a look at it.

In the meanwhile, While this is insecure, you can use command such as ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 ... to accept to connect to host with insecure ciphers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants