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

Failed to set remote SSH tunnel #75

Closed
uishon opened this issue May 3, 2019 · 9 comments
Closed

Failed to set remote SSH tunnel #75

uishon opened this issue May 3, 2019 · 9 comments
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH

Comments

@uishon
Copy link

uishon commented May 3, 2019

  • VSCode Version: 1.34.0-insiders
  • Local OS Version: Windows 10. 1809.
  • Remote OS Version: Ubuntu 18.04 (running on on hyper-v)
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

  1. remote-ssh: connect
  2. terminal prompts for password
  3. connection works but, eventually, I get an error message and this log
SSH Resolver called for "ssh-remote+vm-uishon-ubuntu"
SSH Resolver called for host: vm-uishon-ubuntu
Setting up SSH remote "vm-uishon-ubuntu"
Using commit id "473af338e1bd9ad4d9853933da1cd9d5d9e07dc9" and quality "insider" for server
Install and start server if needed
> 
> Pseudo-terminal will not be allocated because stdin is not a terminal.
> 
> uishon@172.17.104.39's password:
> 
> 
> Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-48-generic x86_64)
> 
>  * Documentation:  https://help.ubuntu.com
>  * Management:     https://landscape.canonical.com
>  * Support:        https://ubuntu.com/advantage
> 
>  * Ubuntu's Kubernetes 1.14 distributions can bypass Docker and use containerd
>    directly, see https://bit.ly/ubuntu-containerd or try it now with
> 
>      snap install microk8s --classic
> 
>  * Canonical Livepatch is enabled.
>    - All available patches applied.
> 
> 44 packages can be updated.
> 0 updates are security updates.
> 
> 
> bash: cannot set terminal process group (119817): Inappropriate ioctl for device
> bash: no job control in this shell
> 
> 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)
> *
> 
> 
> 6079d990-24c2-46f4-a8e6-6e5201303f32==45905==
> 
"install" terminal command done
Received install output: 6079d990-24c2-46f4-a8e6-6e5201303f32==45905==
Server is listening on port 45905
Spawning tunnel with: ssh  vm-uishon-ubuntu -N -L localhost:20479:localhost:45905
Spawned SSH tunnel between local port 20479 and remote port 45905
Waiting for ssh tunnel to be ready
Tunnel(45905) stderr: Permission denied, please try again.

Tunnel(45905) stderr: Permission denied, please try again.

Tunnel(45905) stderr: uishon@172.17.104.39: Permission denied (publickey,password).

Could not establish tunnel to "vm-uishon-ubuntu" (Max wait time exhausted).
Could not establish tunnel to "vm-uishon-ubuntu" (Max wait time exhausted).
@Stephen9s
Copy link

Is your /tmp noexec by any chance?

@kieferrm
Copy link
Member

kieferrm commented May 3, 2019

@uishon you might have another password prompt waiting for you in a terminal. The terminal should have popped up by itself. But if it didn't check the terminals in the drop down of the Terminal panel.

@kieferrm kieferrm added the ssh Issue in vscode-remote SSH label May 3, 2019
@Stephen9s
Copy link

We are using PKI, which works direct but through the jump box, it does not. I also tried jumping through a jump box to a box that would require a password and was prompted. The error that appears is that the server isn’t x86_64 or something like that.

@roblourens
Copy link
Member

If you have to use a password to log in, then you will have to set remote.SSH.showLoginTerminal.

See https://code.visualstudio.com/docs/remote/troubleshooting#_enabling-alternate-ssh-authentication-methods for details

Let me know whether that helps

@roblourens roblourens added verified Verification succeeded info-needed Issue requires more information from poster and removed verified Verification succeeded labels May 4, 2019
@uishon
Copy link
Author

uishon commented May 4, 2019 via email

@jovinbm
Copy link

jovinbm commented May 23, 2019

@uishon How are you dealing with the constantly changing IP address of Hyper-V? Everything works on my end except every time I wake the PC from sleep/restart, they ip address of the VM in Hyper-V is different and I have to change the host in ssh config.

@uishon
Copy link
Author

uishon commented May 23, 2019 via email

@jovinbm
Copy link

jovinbm commented May 23, 2019

Okay thanks. I have a a linux vm called dev but ssh-ing to username@dev.mshome.net but cannot resolve hostname. Am I doing something wrong?

@jovinbm
Copy link

jovinbm commented May 23, 2019

I figured it out. I was using the hyper-v name given to the machine instead of the hostname of the linux machine. Works now. Thanks.

@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster ssh Issue in vscode-remote SSH
Projects
None yet
Development

No branches or pull requests

5 participants