Connection refused VNC - Kali linux - SSH tunnel

I have follow the guide how to deploy a kali linux, everything was fine until the last step.

where I create a tunnel, and connect to the tunnel through a vnc viewer
it show an error "connection closed unexpectedly"

and the terminal show "channel 2: open failed: connect failed: Connection refused"

I try replace the localhost to and I facing the same error !!

1 Reply

I just spun up a Kali Linux instance from the marketplace to test this out and was not able to recreate the error you're seeing. For what it's worth, this was my connection string:

ssh -L 61000:localhost:5901 -N -l <username> <my.linode.ip.address>

Are you able to connect to your instance via SSH without creating a tunnel? If not, it may be an SSH issue you can troubleshoot using instructions found in this guide.

You can pass the -vvv option in your tunnel connection string to get a verbose output of the connection process and potentially find issues there. In this post from StackExchange titled ssh tunnel refusing connections with "channel 2: open failed", the user was able to determine the issue using -v -v which offers some but not all of the output of -vvv.

You may also want to ensure the Marketplace application has had enough time to fully complete the installation. The amount of time it takes for the Kali Linux app to fully deploy is 45-60 minutes. Check out this post titled How can I troubleshoot a Marketplace App? for more information on diagnosing an issue with the app itself.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct