Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Cloudera VM how to configure SSH port?


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?


Re: Cloudera VM how to configure SSH port?

New Contributor

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@