C
C#10mo ago
Relevant

SFTP through a proxy server

I'm using SSH.NET and since I'm unable to connect to production servers directly, I have to first SSH into an intermediary server (using a private key), which I can than use to SSH into the prod servers. It's working-ish, but I'm doing everything through shell streams and using regular expressions to filter the linux output. It's a bit of a mess. I'd really like to use SFTP to check files, but I haven't yet figured out a way to do this through another server using a private key. I know it's a long shot, since this is a pretty specific need, but figured I'd check here to see if anyone has any ideas.
4 Replies
senkd
senkd10mo ago
Have you tried setting up an SSH port forward (via the intermediary server, i.e. local port 1234:ip behind intermediary:22), and then making your SFTP connection via the port forward?
jcotton42
jcotton4210mo ago
does ssh.net not support ProxyJump? ssh -J
jcotton42
jcotton4210mo ago
GitHub
Creating ProxyJump · Issue #481 · sshnet/SSH.NET
Hi, Is it possible to create proxyjump using ssh.net? I have tried using constructor which required all the parameters but no luck. I tried using all the proxytypes options. Getting error as - Remo...
Relevant
RelevantOP10mo ago
Ah yes, this is probably the way to go. I'll try it out
Want results from more Discord servers?
Add your server