0

In my situation, I first need to connect to a UserA then su - UserB in order to have access my files. But when I'm trying to connect with the extension it didn't recognize the server version.

Host some_name
  User  userA
  HostName  xxx.xxx.xxx.xxx
  RemoteCommand "su - userB"
  RequestTTY yes

I got the following error message: unreachable or not Linux x86_64. (Cannot execute command-line and remote command.)

dane ye
  • 11
  • 1

1 Answers1

0

I'm also struggling to solve the same problem. I've tried a bunch of different stuff to try and auth as user b before vscode connects to userAs remote connection server, such as:

  • adding various additional parameters to my ssh config, authing as userB as above,
  • adding a similar su userB command to userA's bashrc file on the remote server,
  • same for bash_profile.

... all to no avail. In all cases, whatever I do, the vscode remote session will be instantiated under the under-privileged user a account, with the remote server launched in user a's user directory. If I auth through a standard terminal app, things work as expected and the su userB command triggers immediately after userA login. If I open a vscode terminal session in the same workspace (i.e. hit the plus sign in the same window as the ssh tunnelling session) and auth as userB, this also works but the session authed as userA persists unchanged.

dr_ocular
  • 31
  • 3