Noam
Noam

Reputation: 1804

Can't connect to "Jenkins-On-Azure"

I created a Jenkins linux vm on Azure on a new resource group.

I followed the steps described here: Create a Jenkins server on an Azure Linux VM from the Azure portal.

So I ran the command ssh -L 127.0.0.1:8080:localhost:8080 [email protected] (changed the username and dns name to my own) on my linux vm and it seems fine (no errors).

Now whenever I try to connect from my own computer (not on azure) on port 8080 I get on the linux vm the following message: channel 2: open failed: administratively prohibited: open failed and It doesn't let me log in into Jenkins.

How can it be solved?

Thank you

Upvotes: 0

Views: 2966

Answers (2)

Shui shengbao
Shui shengbao

Reputation: 19195

This is not a NSG issue. You don't need add port 8080 on Azure NSG rules.

If you want to connect from your computer with http://localhost:8080/, you should need create a SSH tunnel on your local computer. You could do it with putty.

enter image description here

Configure the Tunnel

enter image description here


Also, you could install Linux on Windows. Please refer to the following steps:

1.Install Linux on Windows.

2.Open Power shell on execute bash

3.Execute sudo -i and ssh -L 127.0.0.1:8080:localhost:8080 [email protected]

enter image description here

Now, I could access http://localhost:8080/ on my local computer.(The default user name is admin).

enter image description here

Upvotes: 1

CHEEKATLAPRADEEP
CHEEKATLAPRADEEP

Reputation: 12768

In order to access from external network, you need to "add inbound port rule" as follows:

enter image description here

For more details, refer "Create Jenkins server on an Azure Linux VM from the Azure Portal".

Upvotes: 1

Related Questions