vscode SSH connect failed using SSH-remote extension but success by terminal - visual-studio-code

I'm trying to setup a ssh server using my win10 PC. After following steps to setup the server, it is now can be connected via terminal from by laptop(win11).
However, if I use vscode extension Remote - SSH with connecting config :
Host 192.168.0.183
HostName 192.168.0.183
User User
Port 22
I always encounter Could not establish connection :
[23:49:42.494] Got password response
[23:49:42.494] "install" wrote data to terminal: "**********"
[23:49:42.521] >
[23:49:42.815] > powershell : �L�k���� 'powershell' ���J�O�_�� Cmdlet�B��ơB���O�ɩΥi����{�����W�١C���ˬd�W�٫��r�O�_���T�A�p�G�]�t
[23:49:42.826] > ��|���ܡA�нT�{��|�O�_���T�A�M��A�դ#���C
��� �u��:1 �r��:1
+ powershell
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (powershell:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[23:49:44.124] "install" terminal command done
[23:49:44.125] Install terminal quit with output:
[23:49:44.126] Received install output:
[23:49:44.129] Resolver error: Error:
at g.Create (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:583926)
at c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:581767
at t.handleInstallOutput (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:582462)
at t.tryInstall (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:680469)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:642848
at async t.withShowDetailsEvent (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:646166)
at async t.resolve (c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:643898)
at async c:\Users\lspss\.vscode\extensions\ms-vscode-remote.remote-ssh-0.94.0\out\extension.js:1:723024
[23:49:44.138] -----
Then I tried to use the laptop setting up as server and PC otherwise. It connect successfully with following output log :
[23:56:27.929] Got password response
[23:56:27.929] "install" wrote data to terminal: "************"
[23:56:27.951] >
[23:56:28.645] > Windows PowerShell
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> Install the latest PowerShell for new features and improvements! https://aka.ms/
> PSWindowsPS C:\Users\lspss>
> PS C:\Users\lspss> $uuid="d68ebbafd913"
> PS C:\Users\lspss> "${uuid}: running"
> d68ebbafd913: running
> PS C:\Users\lspss> "d68ebbafd913: pauseLog"
> d68ebbafd913: pauseLog
In comparison, the failed one have some random code I do not understand follow the powershell, while the other success after Windows Powershell.
I have tried to reinstall the ssh-server on my PC, and also tried using other laptop as client, which all failed.

Related

VSCode remote-ssh cant connect to win server 2019

I'm using VSCode remote-ssh extension for development on winserv2016 and it works as intended. We recently switched to winserv2019 and the extension does not work. the error I get in output is
Server failed to start. - Program 'icacls.exe' failed to run: Win32 internal err
> or "Access is denied" 0x5 occurred while reading the console output buffer. Cont
> act Microsoft Customer Support Services.At line:4 char:1
> + icacls $ai_ /reset /Q
I have and admin rights on this machine, does anyone encounter this issue? I've also tried nightly build of VScode and nightly extension. No Success so far.

VS code keeps reconnecting to remote ssh

Problem: VS code keeps disconnecting / reconnecting ssh with remote machine.
After entering password it immediately comes back with password prompt again.
The logs suggest that vs code server fails.
Are there any vs code server logs I can review on the remote machine?
Details: VS code ver 1.4.5 / Windows 10;
Remote: Macbook Air (High Sierra)
Logs are below:
[09:49:41.088] > Password:
[09:49:41.088] Showing password prompt
[09:49:45.455] Got password response
[09:49:45.456] "install" wrote data to terminal: "********"
[09:49:45.889] > 028771948a23: running
[09:49:45.922] > Acquiring lock on /Users/user/.vscode-server/bin/5763d909d5f12fe19f215cbfdd
> 29a91c0fa9208a/vscode-remote-lock.user.5763d909d5f12fe19f215cbfdd29a91c0fa9
> 208a
> \ln /Users/user/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a
> /vscode-remote-lock.user.5763d909d5f12fe19f215cbfdd29a91c0fa9208a.target /U
> sers/user/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/vscod
> e-remote-lock.user.5763d909d5f12fe19f215cbfdd29a91c0fa9208a
>
[09:49:45.943] > Found existing installation at /Users/user/.vscode-server/bin/5763d909d5f12
> fe19f215cbfdd29a91c0fa9208a...
>
[09:49:46.017] > Found running server...
[09:49:46.050] > Checking server status on port 58236 with curl
>
[09:49:46.083] > 000
> 028771948a23##28##
>
[09:49:46.083] Received install output: 028771948a23##28##
[09:49:46.083] Server status check failed - waiting and retrying
[09:49:46.364] "install" terminal command done
[09:49:46.364] Install terminal quit with output:
[09:49:47.091] Running script with connection command: "C:\Program Files\Git\usr\bin\ssh.exe" -T -D
55978 10.0.0.134 bash
[09:49:47.092] Terminal shell path: C:\Windows\System32\cmd.exe
[09:49:47.275] >
[09:49:47.281] Got some output, clearing connection timeout
[09:49:50.747] > Password:
[09:49:50.748] Showing password prompt

unable to run RunProgramInGuest using vmrun in VmwareWorkstation 15

While running the command
/usr/bin/vmrun -T ws -gu username -gp password runProgramInGuest /home/vmware/Ubuntu\ 64-bit/Ubuntu\ 64-bit.vmx -noWait -activeWindow -interactive /usr/bin/strace -o /home/logdir/trace.txt -etrace=forkcloneexecvechdiropencreatclosesocketconnectacceptbindreadwriteunlinkrenamekillpipedupdup2 -s 216 -f /home/malware_analysis/bb0b00438aa782f41a02b434f2c525f2d4a4662604e4254dca8c6a896adaff3a
I am getting the following error:
Error: The specified guest user must be logged in interactively to perform this operation
My setup is as follows :
VMware Workstation 15
Host OS -Ubuntu 16.04
Guest OS OS -Ubuntu 16.04
Delete the .lck files created in the vmware folder where virtual machine files are stored.

Jenkins Build successful even after PS script failed to execute

I am executing Jenkins Job which Builds my .csproj file and execute few PS scripts.
Issue is I get a successful email even if my PS script fails,How should I tell my Jenkins Job to trigger me an email also if PS script is failing.
Error Logs-
Copy-Item : The process cannot access the file
'\\10.0.1.190\d$\Build\RPC\abcde.RPC.AirSearch\Common.Logging.Core.dll' because it is being used by another process.
At C:\Users\Administrator\AppData\Local\Temp\hudson9059014122834846757.ps1:3 char:1
+ Copy-Item "C:\AirSearchBnd\src\abcde.Air.Search.RPC.Host\bin\Release\*" "\\$en ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Copy-Item], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.CopyItemCommand
[AirSearchBnd] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\ADMINI~1\AppData\Local\Temp\hudson9149103993066004448.ps1'"
[SC] CreateService SUCCESS
SERVICE_NAME: AirSearchWindowsService
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 13784
FLAGS :
> C:\Program Files (x86)\Git\bin\git.exe tag -l RPCBUILD_6 # timeout=10
> C:\Program Files (x86)\Git\bin\git.exe tag -a -f -m Jenkins Git plugin tagging with RPCBUILD_6 RPCBUILD_6 # timeout=10
Pushing tag RPCBUILD_6 to repo Dev
> C:\Program Files (x86)\Git\bin\git.exe --version # timeout=10
using GIT_ASKPASS to set credentials
> C:\Program Files (x86)\Git\bin\git.exe push https://github.com/abcdeHoldings/abcde.Services.Air.Search.git RPCBUILD_6
Email was triggered for: Always
Sending email for trigger: Always
Request made to compress build log
Sending email to: abcde#software.com abcde#software.com abcde#software.com abcde#software.com
Finished: SUCCESS
The easiest way is to configure Jenkins to send e-mails on failed builds and in the Powershell step add the following at the end:
if ($error) { exit 1 }
The problem with Jenkins Powershell plugin is that it doesn't honor the errors that happen in Powershell, only the exit code of the shell itself, this will force build to fail and trigger the email.
There is an option of "Attaching Build Log". You can read the build log to see, if the ps script has failed.

Running tests with tcm.exe results in Field not found: 'Microsoft.TeamFoundation.TestManagement.Common.WitCategoryRefName.SharedDataSet'

I'm trying to run an automated test case in Microsoft Test Manager from the command line with the following command:
TCM.exe run /create /title:"Nightly Run" /planid:5554 /suiteid:6582 /configid:97 /collection:XXX /teamproject:XXX /include /builddir:'C:\Source\'
This results in the following error:
.\TCM.exe : Field not found: 'Microsoft.TeamFoundation.TestManagement.Common.WitCategoryRefName.SharedDataSet'.
At C:\Users\XXXX\Desktop\RunTest.ps1:2 char:1
+ .\TCM.exe run /create /title:"Nightly Run" /planid:5554 /suiteid:6582 /configid: ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Field not found...SharedDataSet'.:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
However, this error happens on a Windows Server 2012R2 machine with Visual Studio 2013.4 installed but not on my local dev machine (Windows 10 with VS2013.4).
I know that SharedDataSets are introduced in VS2013.4 but I don't know where this error is coming from since the command doesn't give this error on my local pc.
I've found the solution. Running the following commands on the Windows Server fixed the error:
ngen uninstall Microsoft.TeamFoundation.TestManagement.Client
ngen uninstall Microsoft.TeamFoundation.TestManagement.Common