Question

Can't get VNC working: SSH connection refused

Dear Digital Ocean community,

I’m a developer and I’m all kinda unexperienced to hosting/linux. I know the basics of linux but that’s it. For my latest school project, we are in need of a linux server.

I’m trying to get VNC working, and I followed both of these tutorials:

Problem is, when I arrived at the very last step of the second tutorial (Step Four — Connect to Your VNC Desktop), you should enter the following command:

ssh -L 5901:127.0.0.1:5901 -N -f -l user server_ip_address

I get the following response: ssh: connect to host “here comes my server ip” port 22: Connection refused

It is weird because in step 5 from the first tutorial, they told me to change this port 22 to another port.

I really hope someone can help me, because I’ve been struggling alot with my server lately. :( Thanks in advance!

Jelle


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Use the port you set when you followed the first tutorial.

ssh -L 5901:127.0.0.1:5901 -N -f -l user -p your_port server_ip_address