Posts: 13
Registered: ‎05-25-2016

Cloudera VM how to configure SSH port?

I work with Cloudera VM and I want to assign the port 22 to the port 2222. I go to Cloudera VM -> Settings -> Network -> Advanced -> PortForwarding


I add a line


Protocol TCP

Host Port  2222

Guest Port 22


I execute the command


ssh -p 2222 cloudera@localhost

ssh: connect to host localhost port 2222: Connection refused


How do I configure the port 2222?

New Contributor
Posts: 1
Registered: ‎04-04-2018

Re: Cloudera VM how to configure SSH port?

[ Edited ]

Just stuck into that myself. What I did:


Set up port forwarding in VirtualBox (network settings) from guest to host.

Edited /etc/ssh/sshd_config on guest and uncommented Port 22.

Restarted sshd on guest: sudo service sshd restart

Stopped iptables on guest (might be unnecessary):  sudo service iptables stop

Connected from host using line:

ssh -p 2222 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" cloudera@


SCP command will be:

scp -P 2222 -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" phone_fb_big.csv cloudera@