kandi X-RAY | ssh-tunneling Summary
kandi X-RAY | ssh-tunneling Summary
ssh-tunneling
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ssh-tunneling
ssh-tunneling Key Features
ssh-tunneling Examples and Code Snippets
SYNOPSIS :
tunnel.bash
--help
--configure
--local-port
--remote-port
--local-to-remote
--remote-to-local
--remote-user
--remote-host
--identity-file
DESCRIPTIO
Community Discussions
Trending Discussions on ssh-tunneling
QUESTION
When using local forwarding we are free to pick destination port:
ssh -L 8000:10.10.1.11:80 user@192.168.56.102
- 80 is destination port - we explicitly specify which port to forward to.
Take a look at diagram in this article. If I understand correctly, in dynamic forwarding destination port is somewhat implicit (?):
ssh -D 8080 user@192.168.56.102
- 8080 is local host port, but still it somehow forwards to 80 for us.
Questions:
- How SOCKS5 proxy knows which port to forward traffic to?
- Does SOCKS5 proxy somehow sniff destination from the protocol of the traffic it proxies?
- Can that destination port be configured?
- Where is it configured - on my local machine, or remote that does final forwarding for us? Nowhere?
- Is it a predefined fixed set of protocols/ports? Smth like http=80 destination port?
- Any other internal details of forwarding you can add to clarify the picture.
thanks.
PS. Here https://unix.stackexchange.com/questions/213213/difference-between-local-port-forwarding-and-dynamic-port-forwarding#comment401063_213219 i found some hint to what i'm interested in, pity there are no details provided...
...ANSWER
Answered 2021-Dec-31 at 17:54SSH and SOCKS are two completely different and unrelated protocols. But, to answer your questions:
How SOCKS5 proxy knows which port to forward traffic to?
A SOCKS client explicitly tells it where to connect. The destination host/ip and port are input fields in the SOCKS CONNECT
command. So, there is no guessing/infering at all.
Does SOCKS5 proxy somehow sniff destination from the protocol of the traffic it proxies?
No. SOCKS is just a tunnel of raw bytes, it has no concept of protocols beyond its own.
Can that destination port be configured?
Not on the proxy itself, no. Since the client decides where to connect, any configuration would be on the client side.
Is it a predefined fixed set of protocols/ports? Smth like http=80 destination port?
No.
Any other internal details of forwarding you can add to clarify the picture.
Read the SOCKS protocol specs.
SOCKS v4: https://www.openssh.com/txt/socks4.protocol
SOCKS v4a: https://www.openssh.com/txt/socks4a.protocol
QUESTION
I am trying to use Python to connect to a PostgreSQL instance, which is located on Azure through an SSH tunnel. I can connect to the database with DBeaver with no Problem. Here is the code that I am using.
...ANSWER
Answered 2021-May-31 at 08:26The SSHTunnelForwarder is used if you want to do some stuff on the remote server.
Another code block is needed if you need to use remote server as a bridge to connect to another server:
QUESTION
I'm following this tutorial (best answer) SSH tunneling from Heroku
And they say to set some heroku config vars like MY_VAR=cat my.file
to save the contents of the file to heroku. The problem is, I don't think this method works anymore. I'm looking for help on either how to do this the right way, or how to emulate this. Here is the traceback.
ANSWER
Answered 2020-Mar-28 at 17:05needed quotes.
heroku config:set "MY_VAR=test.file
"
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ssh-tunneling
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page