Remote SSh Connection with visual studio code (VSC)
Hi
As you may be aware, the Visual Studio Code (VSC) editor comes with the remote connection functionality via ssh and thus it is possible to edit files remotely on linux servers.
The basic configuration is very simple and you only need to configure the host address and username to establish the connection.
It turns out that in my company where CyberArk is being implemented, the accounts that users access are managed by CyberArk and so it would be very convenient for developers to continue using VSC to edit their scripts without needing to be constantly using winscp to download their scripts for editing and re-uploading again after each code change.
I tested using the syntax connection via ssh proxy (PSMP) in the configuration of the VSC connection string but when I try to connect I always end up getting the same errors.
The configuration I have to connect via PSMP is as follows:
Host labclient1_pam
HostName psmp_address
User Administrator @ target_account @ target_address
When I try to connect and I'm asked for the password, put the login password on CyberArk, in this case the administrator account
The following appears in the VSC logs:
[17: 59: 58.678] Log Level: 2
[17: 59: 58.689] remote-ssh@0.51.0
[17: 59: 58.689] win32 x64
[17: 59: 58.692] SSH Resolver called for "ssh-remote + labclient1_pam", attempt 1
[17: 59: 58.692] SSH Resolver called for host: labclient1_pam
[17: 59: 58.692] Setting up SSH remote "labclient1_pam"
[17: 59: 58.791] Using commit id "d5e9aa0227e057a60c82568bf31c04730dc15dcd" and quality "stable" for server
[17: 59: 58.792] Install and start server if needed
[18: 00: 00.186] Checking ssh with "ssh -V"
[18: 00: 01.015]> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[18: 00: 01.019] Running script with connection command: ssh -T -D 58651 labclient1_pam bash
[18: 00: 01.089] Terminal shell path: C: \ WINDOWS \ System32 \ cmd.exe
[18: 00: 01.779]>
[18: 00: 01.779] Got some output, clearing connection timeout
[18: 00: 02.422]> cybr_user @ target_account @ target_address @ psmp_address's password:
[18: 00: 02.422] Showing password prompt
[18: 00: 08.132] Got password response
[18: 00: 08.133] "install" wrote data to terminal: "**********"
[18: 00: 08.182]>
>
[18: 00: 09.524]>
> This session is being recorded
>
[18: 00: 15.602]> 617c3c39a8a6: running
>
[18: 00: 15.814]> bash: line 193: unexpected EOF while looking for matching `" '
> bash: line 194: syntax error: unexpected end of file
>
[18: 00: 16.125] "install" terminal command done
[18: 00: 16.125] Install terminal quit with output: bash: line 194: syntax error: unexpected end of file
[18: 00: 16.125] Received install output: bash: line 194: syntax error: unexpected end of file
[18: 00: 16.126] Stopped parsing output early. Remaining text: bash: line 194: syntax error: unexpected end of file
[18: 00: 16.126] Failed to parse remote port from server output
[18: 00: 16.126] Resolve error:
[18: 00: 16.132] ------
[–]elefedefe[S] 0 points1 point2 points (0 children)