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

rssh-download channel gets sent to the user's SSH client instead of the Server's SSH connection in Jump Host Mode #175

Closed
ld-carapace opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ld-carapace
Copy link

ld-carapace commented Oct 31, 2024

Detail

When connecting to an RSSH client in jump host mode, i.e. -J myrsshserver my-client-name, the rssh-download channel is sent to the user's SSH client, rather than to the RSSH server.

Logs

when trying to do ssh -v myrsshclient rssh://busybox:

debug1: Sending command: rssh://busybox
debug1: client_input_channel_open: ctype rssh-download rchan 1 win 2097152 max 32768
debug1: failure rssh-download
ssh: rejected: administratively prohibited (open failed)

Root Cause Analysis:

When download is called, the argument "serverConnection" is a slight misnomer - it's actually the session-specific connection.

ch, reqs, err := serverConnection.OpenChannel("rssh-download", []byte(filename))

Is set in NewSession here:

func NewSession(connection ssh.Conn) *Session {
return &Session{
ServerConnection: connection,

Which is constructed here in jump host mode:

session := connection.NewSession(conn)

@NHAS NHAS self-assigned this Oct 31, 2024
@NHAS NHAS added the bug Something isn't working label Oct 31, 2024
@NHAS NHAS closed this as completed in 6370728 Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants