Reputation: 825
I have successfully started hortonworks sandbox container in my docker in my macbook. The guide said to connect to sandbox via this command:
ssh -p 2222 root@localhost
But it gives me
ssh: connect to host localhost port 2222: Connection refused
Then I tried
ssh -p 22 root@localhost
It asks me the password (instead of prompting me to change my password as the guide says). I tried to input "hadoop" as password but it won't let me in. I tried "root", still the same. I tried to login using my laptop password, still cannot login.
How should I be able to connect to sandbox container?
Upvotes: 2
Views: 3341
Reputation: 1933
I believe you should exec into the container using. hortonworkssandbox is the container name when you launched it.
docker exec -it hortonworkssandbox /bin/bash
Upvotes: 2
Reputation: 66
In the case of root login, try to use port: 2200
Note: This port is correct only if you have HDP (sandbox) which is running as VirtualBox VM. In the case of docker this info is useless.
Upvotes: 0
Reputation: 2178
If you ssh xxx.xxx.xxx.xxx -p 22
you will be in Centos
If you ssh xxx.xxx.xxx.xxx -p 2222
you will be connected to the sandbox
for localhost connection replace xxx.xxx.xxx.xxx with root@localhost.
run ps -ef | grep container-ip
in order to get container ip
now ssh root@container ip
and then ambari-admin-password-reset
probabaly you will be able to set password.
For virtual box you can follow below approach:
Goto terminal of your sandbox in oracle virtualBox --> Press --> enter username - root --> enter password - hadoop --> it will ask you to set new password --> set new password --> then try to login via putty using new credentials
Upvotes: 1