Users

All Posts (12)

avatar

blaise1

How to use SCP to Linux machine on Azure through bastion

avatar
avatar
avatar

Hi again,

Here is a screenshot of my hierarchy:

As you can see I have a folder "Konakart" that contains the bastion definition, and two sublofders "test" and "prod" with SSH connections to machines inside.

I created the SCP entry at the same level as the SSH entry in order to connect to the very same machine: "konakart test 01" in order to share the Bastion settings.

Yours

Blaise

How to use SCP to Linux machine on Azure through bastion

avatar
avatar
avatar

Hi,

Just upgraded to 2024.1.25.0. Indeed, the SCP option is now available using the Azure bastion, I don't get the error message anymore, but... it does not work yet.

I am still missing the "azure resources" bloc in the VPN tab. The window opens but no connection is established. It asks for a password, but nothing happens next whether a provide the right one or not.

Also I notice the "advanced" tab for connection that exists for SSH does not exists for SCP. I usually select the "IPV4 only" box in this tab as IPV6 does not work for me when connecting to Azure.

Yours

Blaise

How to use SCP to Linux machine on Azure through bastion

avatar
avatar
avatar

Hi,

Thanks for the feedback. I'll wait for the software update.

Blaise

How to use SCP to Linux machine on Azure through bastion

avatar
avatar
avatar

Hi,

Thanks for the tip about SFTP, I was not aware of this feature and it mostly solves my problem.

Anyway, here is how I use SCP with the azure CLI.

First I log unsing

az login

Then I open a tunnel between my PC and the remote Azure machine with:

az network bastion tunnel --target-resource-id "{resource id of the target VM}" --resource-port 22 --port 4900 --name {your_bastion] --resource-group {resource group of your bastion}

This command returns :

I can now start my favorite SCP GUI tool, winSCP by connecting to localhost:4900 and logging into my VM

Hope this helps

Blaise

How to use SCP to Linux machine on Azure through bastion

avatar
avatar
avatar

Hi,

During the last few months RDM has greatly improved support of Azure Bastion to connect to a Linux machine with SSH.

Now I am trying to go even further... and use the SCP module.

When trying to set it up I find almost the same entries as for SSH except that I can't fully configure the Bastion parameters. Ultimately it fails to connect with a message "entry type is not supported"'

Using the azure CLI to open a VPN through bastion for SSH and for SCP is the same, so I would expect that it would be very similar in RDM too, or at least reasonably simple to implement.

Am I missing something? If it is unsupported is there a chance it will be in the future?

Attached are a few screenshots showing the missing "Azure resource" block when using SCP.

Thanks

Blaise

SSH to Azure Linux VM via bastion works erraticaly.

avatar
avatar
avatar
avatar

Hi,

Problem Solved! Thanks a lot.

This is not the first time I have issues with IPV6 with various software and I usually disable it. In fact it is disabled on some of my connections, mostly wifi, and still active on some others as it is the Windows default.Mybe this is why I got this apparently erratic behavior.

Yours

Blaise

SSH to Azure Linux VM via bastion works erraticaly.

avatar
avatar
avatar
avatar

Hi,

To be honnest my feeling is that the problem is on the Microsoft side... but it is only a feeling.

I was about to answer that I can't do your test as it now works.... but you are lucky, it doesn't work anymore on my main PC, but it works on my sedondary PC.We are in this strange situation where the same Devolution account yields two different results on two different machines.

Could this be linked to some authorisation token? I logged on both machines, could one machine use for some reason a cached token generated for the other one and stored in the shared safe?

Here is the profile output with sensitive data obfuscated.

Double click triggered

Double click node:PROD Konakart 01

OpenConnection: Preparing Azure Bastion

OpenVPN: Finding Opener

OpenVPN: Preparing Dynamic Port

OpenVPN: vpnOpener.Open

Resolved Azure Resource ID: /subscriptions/5f5cc21c-fc29-4xxxxxxxxxxxxxxxxxxxxxx8af7ff/resourceGroups/zuc-10xxxxxxxxrver/providers/Microsoft.Compute/virtualMachines/zuxxxxxxx-01

Debug[2023-12-13T10:05:48]: AZB Tunnel 0d378268-05x7ab63e to zuc-pf-prod-abast-euw initializing

OpenVPN: Result is Not Null

OpenVPN: Calling AfterVPNOpen

OpenVPN: Returning result

Info[2023-12-13T10:05:48]: AZB Tunnel 0d3xxxxxxxxxxxxxxxxxxxxx2da7ab63e listening at 127.0.0.1:26684

Une erreur inattendue s'est produite. Code d'erreur : -2147014839

(10057L) Une requête d’envoi ou de réception de données n’a pas été autorisée car le socket n’est pas connecté et (lors de l’envoi sur un socket datagramme en utilisant un appel sendto) aucune adresse n’a été fournie.

DEBUG - Closing VPN Result Type:EmbededConnectionResult

DEBUG - Closing VPN IsClosed:True

DEBUG - Closing VPN Process is null:false

DEBUG - Closing VPN Process.HasExited:False

DEBUG - Closing VPN Stack:

à Devolutions.RemoteDesktopManager.Managers.OpenedConnectionManager.UpdateOpenedConnections()

à Devolutions.RemoteDesktopManager.Managers.EmbeddedViewManager.Close(IFormConnectionContainer childForm, CloseConnectionMode closeConnectionMode)

à Devolutions.RemoteDesktopManager.Frames.Embedded.FreEmbeddedView.Close()

à Devolutions.RemoteDesktopManager.Frames.Embedded.FreEmbeddedNativeSshShell.Disconnecting()

à Devolutions.RemoteDesktopManager.Managers.EmbeddedViewManager.Close(IFormConnectionContainer childForm, CloseConnectionMode closeConnectionMode)

à Devolutions.RemoteDesktopManager.Frames.Embedded.FreEmbeddedView.Close()

à Devolutions.RemoteDesktopManager.Frames.Embedded.FreEmbeddedNativeSshShell.Terminal_Disconnected(Object sender, EventArgs e)

à Devolutions.Protocols.XtermSsh.OnDisconnected()

à System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)

à System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)

à System.Delegate.DynamicInvokeImpl(Object[] args)

à System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry tme)

à System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)

à System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

à System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

à System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry tme)

à System.Windows.Forms.Control.InvokeMarshaledCallbacks()

à System.Windows.Forms.Control.WndProc(Message& m)

à System.Windows.Forms.Form.WndProc(Message& m)

à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

à System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)

à System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

à System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

à System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

à Devolutions.RemoteDesktopManager.Program.Main(String[] args)

Debug[2023-12-13T10:06:02]: AZB Tunnel 0d378268xxxxxxxxxxxxxxxxxxxxxa7ab63e uninitializing

SSH to Azure Linux VM via bastion works erraticaly.

avatar
avatar
avatar
avatar

Hi,

Should I answer to the mail or in this forum?

About versions, I usualy upgrade as soon as the popup appears that informs me a new version is available.

As explained, the problem used to come and go, not at the same time on my two PC, but became (almost) permanent recently. It did not happen after an upgrade but after I had been using 2023.3.22.0 happlyly for a while. I upgraded to 2023.3.32.0 hoping it would solve my problem but it did not.

I put "almost" in brackets because suddenly this morning it started workgin again, even hough I did not change anything in the configuration or even reboot any of my 2 PCs. It works with both versions as I did not upgrade both machines yet.

When it does not work in RDM I can still use tehe Azure CLI to connect (I would be in big trouble if not....) in two ways:

  • Open a tunnel and connect my SCP or SSH client to port 127.90.0.1:2222

az network bastion tunnel --name "xxxx" --resource-group "xxxx" --target-resource-id "/subscriptions/xxxxxx" --resource-port "22" --port "2222"

  • Open the Azure embedded SSH client with

az network bastion ssh --name "xxxxx" --resource-group "xxxx" --target-resource-id "/subscriptions/xxxx" --auth-type "AAD"

SSH to Azure Linux VM via bastion works erraticaly.

avatar
avatar
avatar
avatar

Hi,

I recently managed to configure RDM to connect to an Azure Linux box through the Azure bastion thanks to some messages I found here. I log to the bastion and then use an SSH key to log to the server.

I have two PCs connected to the same Devolution account and thus sharing configuration.

After a few weeks of perfect operations I started to have issues connecting to the boxes, BUT the issues were not on both my PCs simulanesouly. One would connect fine and not the other one. Still they share the same account and settings.... I thought the probelm was on the Microsoft side.Problem would appear and disapear without reason.

Since a few days both PCs do not connect anymore. I tried rebooting of course, installing the latest version as I saw some improvements where made around the bastion support.... no difference.

When trying to log it seems to start fine, the screen goes black, and then I get this error message in French even though my RDM is in English (but on a French OS)

I emptied the RDM logs and tried again to catch the exact errors there..... they remain empty. This error does not end up in the logs.

Any idea where I should look? I am totally puzzled there.

Thanks

Blaise

Error message box for missing registry key

avatar
avatar
avatar

Hi,

Problem is gone.... thanks.

I had set the debug level to 3 while testing your new developments for direct VPN to Azure Bastion and did not set it back to 0.

You can close the thread.

Blaise

Error message box for missing registry key

avatar
avatar
avatar

Hi,

I was using 2023.2.14. I just upgraded to 2023.2.17, same problem.

Blaise

Error message box for missing registry key

avatar
avatar
avatar

Hi,

I get this error on my first attempt to open a RDP session after starting RDM. Apart from the additional click on OK I haven't noticed any other issue.

Any idea why I get it and how to solve it? Should I create the missing key?

This is on a Windows 10 PC, connecting to direct RDP and through Azure Bastion (very nice feature added BTW, I could get rid of my nasty powershell scripts...)

Thanks.

1 - 12 of 12 items