Issue
I have created Azure Baston Host and VM in my Azure Subscription, I am able to SSH to my VM from Azure Portal by giving username and password, I am looking for alternate SSH method like CLI SSH.
I don't want to use Browser based SSH from Azure Portal, Please let me know any method to SSH to VM through Bastion Host from CLI.
Solution
That does not seem valid with Azure Bastion involved as far as I understand your requirement.
Azure Bastion, by design, is a service that's meant to provide RDP/SSH connectivity to your VMs directly from the Azure portal over TLS. It is architected as a PaaS service and is fully managed by the platform itself.
Here is how an Azure Bastion deployment looks like:
As depicted above, the Bastion host is deployed in a VNet and the user connects to the Azure portal using any HTML5 browser.
If this does not fit your use case, you might have to consider building your own jumpbox and custom-configure your NSGs to harden security.
Answered By - Bhargavi Annadevara Answer Checked By - Willingham (WPSolving Volunteer)