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

Connection aborted in Proxmox VM #398

Open
archibaldodlc opened this issue Dec 15, 2024 · 4 comments
Open

Connection aborted in Proxmox VM #398

archibaldodlc opened this issue Dec 15, 2024 · 4 comments

Comments

@archibaldodlc
Copy link

Hi, everyone!

I heard about Xpipe on Awesome Open Source Youtube channel, and started to use it. It's great and I can manage all my homelab connections from the app, I had an issue with the Proxmox VM on Xpipe though. When try to connect to the VM I got the following message:

An error occurred: Shell opener command was unsuccessful:
kex_exchange_identification: read: Connection aborted

banner exchange: Connection to ::1 port 13874: Connection aborted
Press [r] to restart or any other key to close this session ...

My setup:
Windows 11 Pro, OS build 26100.2605
Xpipe 13.4.4-202412130628
cmd (for SSH connections). Also tried with Termius and Widnows Terminal 1.21.3231.0

Debug log

00:09:48:176 - trace: Terminal session opened {
    pid=40300
    exec=C:\Windows\System32\cmd.exe
}
00:09:48:848 - trace: Read:
banner exchange: Connection to ::1 port 14533: Connection aborted
a92dd2a0-9dbf-4013-aa64-81585fbbfc85

00:09:48:849 - trace: Killing sub shell {
    command=set "BEACON_PORT=21721"&set "ASKPASS_SECRET=9650a589-cc0d-3e5f-90a1-d6f7fdd03466"&set "ASKPASS_REQUEST=a92dd2a0-9dbf-4013-aa64-81585fbbfc85"&set "ASKPASS_PREFIX=[ssh]"&set "SSH_ASKPASS=C:\Users\vimer\AppData\Local\XPipe\cli\bin\xpipe.exe"&set "SSH_ASKPASS_REQUIRE=force"&set "DISPLAY=localhost:0.0"&ssh -oNumberOfPasswordPrompts=3 "edited@localhost" -p 14533 -oStrictHostKeyChecking=accept-new -oRemoteCommand=none -oNoHostAuthenticationForLocalhost=yes -T -oIdentitiesOnly=yes
}
00:09:48:849 - trace: Killing local shell ...
00:09:48:867 - trace: Killing sub shell {
    command=set "BEACON_PORT=21721"&set "ASKPASS_SECRET=9650a589-cc0d-3e5f-90a1-d6f7fdd03466"&set "ASKPASS_REQUEST=a92dd2a0-9dbf-4013-aa64-81585fbbfc85"&set "ASKPASS_PREFIX=[ssh]"&set "SSH_ASKPASS=C:\Users\vimer\AppData\Local\XPipe\cli\bin\xpipe.exe"&set "SSH_ASKPASS_REQUIRE=force"&set "DISPLAY=localhost:0.0"&ssh -oNumberOfPasswordPrompts=3 "edited@localhost" -p 14533 -oStrictHostKeyChecking=accept-new -oRemoteCommand=none -oNoHostAuthenticationForLocalhost=yes -T -oIdentitiesOnly=yes
}
00:09:48:877 - error: Shell opener command was unsuccessful:
kex_exchange_identification: read: Connection aborted

banner exchange: Connection to ::1 port 14533: Connection aborted
io.xpipe.core.process.ProcessOutputException: Shell opener command was unsuccessful:
kex_exchange_identification: read: Connection aborted

banner exchange: Connection to ::1 port 14533: Connection aborted
        at io.xpipe.core.process.ProcessOutputException.withPrefix(ProcessOutputException.java:29)
        at io.xpipe.ext.proc.util.f.bL(SourceFile:182)
        at io.xpipe.ext.proc.m.p(SourceFile:2642)
        at io.xpipe.ext.proc.ssh.r.p(SourceFile:78)
        at io.xpipe.ext.proc.m.D(SourceFile:541)
        at io.xpipe.ext.proc.m.start(SourceFile:255)
        at io.xpipe.ext.proc.m.a(SourceFile:362)
        at io.xpipe.ext.proc.m.prepareIntermediateTerminalOpen(SourceFile:271)
        at io.xpipe.ext.proc.i.prepareTerminalOpen(SourceFile:74)
        at io.xpipe.app.terminal.TerminalLaunchRequest.setupRequest(TerminalLaunchRequest.java:97)
        at io.xpipe.app.terminal.TerminalLaunchRequest.lambda$setupRequestAsync$0(TerminalLaunchRequest.java:64)
        at io.xpipe.app.util.ThreadHelper.lambda$wrap$0(ThreadHelper.java:19)
        at java.lang.Thread.run(Thread.java:1570)

If I run ssh command (ssh -i ./myprivatekey edited@IPVM) run fine, the problem is only when I use the Proxmox integration on Xpipe.
What it can be?

Thanks in advance.

@crschnick
Copy link
Member

So it will forward the remote VM ip / port to localhost first. It will then connect to it. It does it because we can't assume that the VM is exposed to the public and might only be reachable on the hypervisor host. If that is done, in this example, it will run ssh -oNumberOfPasswordPrompts=3 "edited@localhost" -p 14533 -oStrictHostKeyChecking=accept-new -oRemoteCommand=none -oNoHostAuthenticationForLocalhost=yes -T -oIdentitiesOnly=yes. The port might change on every xpipe restart.

If it says connection aborted, is there any kind of firewall or block in the VM? I also don't see the private key argument in there.

@archibaldodlc
Copy link
Author

Thanks for your response, @crschnick. It was a firewall issue. I have the VMs and the Proxmox servers in differente VLANS, and in Opnsense I didn't create a rule to allow the Port Forwarding that creates Xpipe from Proxmox Servers to VMs. After allow the connection betwen them Xpipe successfully create the tunnel.

Regards,
Víctor.

@crschnick
Copy link
Member

Alright, that's great. I'm not sure whether it would be possible to improve the user experience here, i.e. to show why it is failing

@crschnick
Copy link
Member

I tried to improve the error message is in XPipe 14 for cases like this. Not entirely sure whether works for setups like yours. You can test it if you want

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

No branches or pull requests

2 participants