-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Auto-AssignAuto assign by botAuto assign by botNetworkNetwork - BastionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.VM SSHcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
Add support for custom ports to bastion ssh.
The use case is that we want to connect to a Private AKS cluster.
We have bastion setup and VM we connect to.
It would be nice to force the custom ports, and let az do the ssh key management.
az network bastion ssh --name "bastion" --resource-group "$group" --target-resource-id "$vmId" --resource-port 22 --auth-type AAD -- -L $customPort:our-cluster-abcde.dev-eus.privatelink.eastus.azmk8s.io:443
Instead we have to create the tunnel, the create ssh keys, then run ssh with port forwarding.
kubectl config set "clusters.$name.server" "https://localhost:$clusterPort"
az network bastion tunnel --name bastion --resource-group $group--target-resource-id '$vmId' --resource-port 22 --port $bastionPort
az ssh config --ip localhost --port $bastionPort --file $sshConfigPath --overwrite --yes-without-prompt #--debug
ssh -NTf -v $sshParams localhost -p $bastionPort -F $sshConfigPath -o ExitOnForwardFailure=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botNetworkNetwork - BastionService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.VM SSHcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that