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

Proxy server with publicKey auth #1262

Open
ptorrent opened this issue Jan 17, 2023 · 2 comments
Open

Proxy server with publicKey auth #1262

ptorrent opened this issue Jan 17, 2023 · 2 comments

Comments

@ptorrent
Copy link

ptorrent commented Jan 17, 2023

Hello there,

Is there a way to forward the publicKey to other ssh server ?

Something like that ?

			 client.on('authentication', (ctx) => {
				else if(ctx.method == 'publickey'){
					connect({
						username 		: ctx.username,
						publicKey 		: ctx.key.data
					}, function(err, session){
						if(err) return ctx.reject()
						ctx.accept()
					})
				}

Not an expert, maybe it's crazy x)

Thanks for your help !

@mscdex
Copy link
Owner

mscdex commented Feb 2, 2023

No, there is currently no built-in way to proxy authentication to a third party.

@nodegin
Copy link

nodegin commented Sep 2, 2023

@mscdex I have the same question.
Could you give me some idea on how can I achieve something like this please?

For example, when user connects to ssh2 server,
we initiate a client request to another server immediately and proxy/pipe the incoming user connection to the outgoing client connection with another remote server.

Is this even technically possible?
If so it would be really helpful if you could give me some hint on how can I get started with editing the source to achieve this.
Great thanks for this awesome lib!

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

3 participants