LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-13-2021, 03:15 AM   #1
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
VSCode and SSH FS are not making a connection to a remote host


This one's sort of got me scratching my head.

I have VSCode installed on Leap (15.3) and I've installed the SSH FS extension in an attempt to set up a connection to a directory tree on a Slackware system.

I have SSH keys set up that allow me to connect from Leap to Slackware (and vice versa) passwordlessly; I've been doing this without problems for a long time. However when I create a connection configuration pointing to a file tree on the Slackware system and attempt to connect to it, I receive an error stating that my key is not valid:
Code:
Error while connecting to SSH FS my_remote_connection_name:
privateKey value does not contain a (valid) private key
which doesn't make sense to me as I can connect via ssh from a bash prompt without any errors.

I get a similar error message about an invalid private key if I attempt to open a terminal to the Slackware system from within VSCode.

So...

I tried setting up the connection with a password. This is not the way I wanted to go since VSCode tells you that the password is saved in plaintext. But... it worked and I was able to connect though not using a secure method if the password is, indeed, stored as plaintext somewhere. (I grepped for the remote account's password within everything under $HOME/.vscode and was not able to find any files. It does, however, appear in plaintext in files under $HOME/Code. [ugh])

I suspect the errors I'm seeing have got something to do with some arcane aspect of how I should configure the remote connection but, frankly, the configuration screen/form looks logical enough. Apparently I'm missing something subtle (or maybe the extension didn't actually install properly).

Q1: Any ideas on what would cause VSCode + SSH FS to believe that my SSH key is invalid?

Q2: Could it be that the keys are actually not compatible with SSH FS? I haven't found anything that stated that I needed to create keys in a particular way that will play nice with this extension and it wouldn't be too awful to have to generate new keys if that's actually needed.


TIA... for any information about this.
 
Old 11-13-2021, 06:55 AM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,377

Rep: Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757Reputation: 2757
Looking at this, I see
Quote:
In VS Code, run Remote-SSH: Open Configuration File... in the Command Palette (F1), select an SSH config file, and add (or modify) a host entry as follows:

Host name-of-ssh-host-here
User your-user-name-on-host
HostName host-fqdn-or-ip-goes-here
IdentityFile ~/.ssh/id_rsa-remote-ssh
which suggests you need to configure from within VS Code.
 
Old 11-13-2021, 11:15 AM   #3
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Original Poster
Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by allend View Post
Looking at this, I see

which suggests you need to configure from within VS Code.
I looked at Remote-SSH but was hoping to stick with SSH FS as that's what many of us at work have been using. Though, TBH, I've been sticking with an older release of that extension at work as the last upgrade rendered my connections unavailable. And the older version I've been using there is no longer downloadable. I guess that should have been evidence of trouble ahead, eh?

Thanks... I'll give Remote-SSH a shot. I'll report back if that extension gets me connected.

Update: Hmm... I have more digging to do but it looks like Remote-SSH requires/limits you to be connected to a single remote system at a time. Not what I'm looking for but like I mentioned... still digging but that's a bit of a show stopper if I don't see anything that gets around that.

Update #2: Ah... The downside of trying to configure software after doing it for 9-10 hours at work. It turns out I was misreading the blurb on the key specification field of the config form and botched the SSH setup withing SSH FS. Calling this solved.

Last edited by rnturn; 11-13-2021 at 12:39 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Developers offered browser-based fun in VSCode.dev and Java action in Visual Studio Code LXer Syndicated Linux News 0 10-21-2021 09:03 PM
Firejail and VSCode brokenkeys Linux - Security 3 10-07-2019 09:13 AM
Can't SSH to remote machine: Connection closed by remote host Avatar Linux - Networking 35 10-23-2017 12:21 AM
Missing DLL according To VSCode fefe1200 Debian 3 07-03-2017 03:16 PM
[SOLVED] How to copy file from remote host to local host then delete from remote host legendmac Linux - Newbie 13 05-27-2015 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration