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

Port forwarding / tunnelling with -fN doesn't go into the background #999

Open
ghost opened this issue Dec 23, 2017 · 4 comments
Open

Port forwarding / tunnelling with -fN doesn't go into the background #999

ghost opened this issue Dec 23, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Dec 23, 2017

"OpenSSH for Windows" version
0.0.24.0

Client OperatingSystem
Windows 10 Pro 1703

What is failing
ssh -fN -L2222:somehost:22 someotherhost should go into the background while the tunnel remains open

The tunnel works, but the command ties up the terminal - it doesn't go into the background

@bagajjal
Copy link
Collaborator

bagajjal commented Dec 28, 2017

There is no concept of running background console jobs in Windows??

@manojampalam
Copy link
Contributor

AFAIK no. You may use
start ssh ....
to achieve something close.

@Hashbrown777
Copy link

I don't know why for Windows openssh-portable doesn't support spawning the process and detaching from the console after credentials have been accepted, but if anyone desperately needs this I have a work around.

I've implemented a way to do it in this short pwsh script that you can dot-source, it works by spawning a Process which successfully establishes a connection and backgrounds itself, but there's no nohup equivalent if you're planning on closing the terminal after.

@alex180500
Copy link

Are there news for this? I'm just using wsl for this reason for now to connect to hpc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants