Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck on "Opening Remote..." #195

Closed
thernstig opened this issue May 7, 2019 · 15 comments
Closed

Stuck on "Opening Remote..." #195

thernstig opened this issue May 7, 2019 · 15 comments
Labels
ssh Issue in vscode-remote SSH

Comments

@thernstig
Copy link

thernstig commented May 7, 2019

  • VSCode Version: 1.34.0-insider (user setup)
  • Local OS Version: Windows 10 Enterpries, version 1709, OS Build 16299.1004
  • Remote OS Version: Ubuntu 16.04
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. Connect to a remote SSH host in a new Window

I have an ssh config with similar to this:

Host vm
        HostName 10.10.10.10

I can do an ssh vm from Windows PowerShell without any trouble. The user on Windows is the same as in my vm. It is using key based authentication, with no passphrase set.

When I try to open this with Remote-SSH: Connect to Host... it shows the notification for a short while but then in the lower-left it just gets stuck at "Opening Remote...". No notifications, no nothing.

I've tried searching for existing issues and I've read all documentation in regards to Remote development, but found no clue as to what I might be doing wrong.

@jbelien
Copy link

jbelien commented May 7, 2019

I had the same issue, have a look at the VS Code Terminal (CTRL + J), in my case it was asking for the password (or the SSH key passphrase).

@thernstig
Copy link
Author

I could not find anything under CTRL+J, in which panel should I look? If I open the TERMINAL it just says 1: Starting... in the drop-down to the right. As far as I am aware I have no passphrase, also considering I do not need to supply one if I use the normal ssh command from Windows PowerShell. Just to make absolutely sure, I checked this also according to https://security.stackexchange.com/a/129727. So I am fairly sure I do not have a passphrase set.

@egamma egamma added ssh Issue in vscode-remote SSH info-needed Issue requires more information from poster labels May 7, 2019
@egamma
Copy link
Member

egamma commented May 7, 2019

@jbelien can you pls open the 'Output' panel at the bottom and switch to the 'Remote - SSH' output and include what is shown here.

@jbelien
Copy link

jbelien commented May 7, 2019

@egamma Unfortunately, I just tried and can't seem to reproduce the "issue" I had.
I had the feeling it was stuck but it was juust waiting for my passphrase.

Since then I enabled "remote.SSH.showLoginTerminal": true and everything is working fine since then.

@egamma
Copy link
Member

egamma commented May 7, 2019

@jbelien thanks for following up. Just checked and the use of showLoginTerminal is documented https://code.visualstudio.com/docs/remote/troubleshooting#_enabling-alternate-ssh-authentication-methods. I'm therefore closing this issue.

@egamma egamma closed this as completed May 7, 2019
@thernstig
Copy link
Author

@egamma I was the one to open the issue and it seems you closed it due to a comment by @jbelien, but we do not share the same issue.

I did however enable the logging and this is the output I get:

SSH Resolver called for "ssh-remote+vm"
SSH Resolver called for host: vm
Setting up SSH remote "vm"
Using commit id "daf71423252a707b8e396e8afa8102b717f8213b" and quality "insider" for server
Install and start server if needed
> ...redacted...
> New release '18.04.2 LTS' available.
> Run 'do-release-upgrade' to upgrade to it.
> 
> 
> 
> bash: cannot set terminal process group (68554): Inappropriate ioctl for device
> bash: no job control in this shell
> 
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> tput: No value for $TERM and no -T specified
> 
> Found existing installation...
> 
> Found running server...
> 
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
> 
> c931a42f-ebc8-4c45-a515-5d976ab928af==32873==
> 
"install" terminal command done
Received install output: c931a42f-ebc8-4c45-a515-5d976ab928af==32873==
Server is listening on port 32873
Spawning tunnel with: ssh  vm -L localhost:31784:localhost:32873 "echo -e 'Connected to SSH Host - Please do not close this terminal' && sleep infinity"
Spawned SSH tunnel between local port 31784 and remote port 32873
Waiting for ssh tunnel to be ready
> ...redacted...
Tunneling remote port 32873 to local port 31784
Resolving "ssh-remote+vm" to "localhost:31784", attempt: 1
> channel 3: open failed: administratively prohibited: open failed
> channel 4: open failed: administratively prohibited: open failed
> 
> channel 5: open failed: administratively prohibited: open failed
> Connected to SSH Host - Please do not close this terminal
> 

@thernstig
Copy link
Author

I found that enabling the sshd config AllowTcpForwarding fixed the issue. I think this should be documented somewhere.

@egamma
Copy link
Member

egamma commented May 7, 2019

I found that enabling the sshd config AllowTcpForwarding fixed the issue. I think this should be documented somewhere.

@Chuxel candiate tips & tricks material

@egamma
Copy link
Member

egamma commented May 7, 2019

reopening and labelling as a doc issue.

@egamma egamma reopened this May 7, 2019
@egamma egamma removed the info-needed Issue requires more information from poster label May 7, 2019
@egamma egamma added the doc label May 7, 2019
@thernstig
Copy link
Author

thernstig commented May 7, 2019

A note if the docs get an update: It was the output channel 3: open failed: administratively prohibited: open failed that indicated I needed to set AllowTcpForwarding yes (I actually believe AllowTcpForwarding local should be enough though, but never tested).

Would it also not be a good idea to actually give this feedback to the user somehow in the notification area, and not just in the output panel? I understand it's a hard line to draw though of what should go there and what not.

@shanehou
Copy link

shanehou commented May 8, 2019

AllowTcpForwarding yes doesn't solve it.
Am I required to restart sshd?

@thernstig
Copy link
Author

AllowTcpForwarding yes doesn't solve it.
Am I required to restart sshd?

Yes, a change to sshd config always require a restart. Try a sudo service sshd reload or a sudo service sshd restart if the former does not work. (Or any of the other many variants depending on Linux OS)

@Defite
Copy link

Defite commented May 8, 2019

@thernstig even after restart - doesn't solve the problem.

Screen Shot 2019-05-08 at 16 52 40

@thernstig
Copy link
Author

@Defite That is not the same error I as reported. As you can see here #195 (comment) my error is about channel 3: open failed: administratively prohibited: open failed. That problem was for me solved by setting AllowTcpForwarding yes

@Chuxel Chuxel removed the doc label May 8, 2019
@Chuxel Chuxel removed their assignment May 8, 2019
@Chuxel
Copy link
Member

Chuxel commented May 8, 2019

@egamma This has been added to docs. I think the broader TCP forwarding question (which is what this property turns on) is covered under #92.

@Chuxel Chuxel closed this as completed May 8, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

6 participants