Connect to Linux machine for development, but it doesn't have SFTP
Ed Llewellyn
40
Reputation points
I'm trying to connect Visual Studio 2022 to a Linux machine for remote CMake compiling and debugging.
Attempting to connect to a new Virtual Machine is failing. I can connect to it via SSH from the Windows Admin command line, but VS 2022 wants to connect via SFTP as well as SSH, and since the device doesn't have SFTP, the connection fails.
My CMakeSettings.json file is set to use rsync for file transfers, so I should have to use SFTP. My custom Linux VM doesn't have SFTP currently. Why is VS 2022 wanting to connect over that as well as SSH?
Here is a snippet from the log:
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at liblinux.RemoteSystemBase.<ConnectCoreAsync>d__69.MoveNext()
16:46:25.8280688 [Info, Thread 1] liblinux.RemoteSystemBase: Connecting over SSH to 1.1.1.122:22
16:46:25.9764914 [Info, Thread 1] liblinux.IO.RemoteFileSystemImpl: Connecting over SFTP to 1.1.1.122:22
16:46:26.2342926 [Info, Thread 1] liblinux.HostKeyVerifier: Connection failed.
16:46:26.2342926 [Info, Thread 1] liblinux.HostKeyVerifier: Renci.SshNet.Common.SshException: Channel was closed.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.Sftp.SftpSession.OnChannelOpen()
at Renci.SshNet.SftpClient.CreateAndConnectToSftpSession()
at Renci.SshNet.SftpClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()
at liblinux.HostKeyVerifier.Connect(BaseClient client)
16:46:26.2342926 [Error, Thread 1] liblinux.IO.RemoteFileSystemImpl: Connection failure over SFTP to 1.1.1.122:22
16:46:26.2401438 [Error, Thread 1] liblinux.IO.RemoteFileSystemImpl: Renci.SshNet.Common.SshException: Channel was closed.
at Renci.SshNet.SubsystemSession.WaitOnHandle(WaitHandle waitHandle, Int32 millisecondsTimeout)
at Renci.SshNet.Sftp.SftpSession.OnChannelOpen()
at Renci.SshNet.SftpClient.CreateAndConnectToSftpSession()
at Renci.SshNet.SftpClient.OnConnected()
at Renci.SshNet.BaseClient.Connect()
at liblinux.HostKeyVerifier.Connect(BaseClient client)
at liblinux.IO.RemoteFileSystemImpl.ConnectCore()
16:46:26.2401438 [Info, Thread 1] liblinux.RemoteSystemBase: Disconnecting over SSH from "1.1.1.122:22"
16:46:57.2404501 [Info, Thread 183] liblinux.Local.Services.WslEnumerator: Begin executing: C:\WINDOWS\System32\wsl.exe --list --verbose
16:46:57.3575925 [Info, Thread 183] liblinux.Local.Services.WslEnumerator: End executing: C:\WINDOWS\System32\wsl.exe; exitcode: 0; duration: 00:00:00.1163820
Developer technologies | Visual Studio | Debugging
1,104 questions
Developer technologies | Visual Studio | Setup
1,206 questions
Sign in to answer