Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
NOTE: This module is still in early development and may not be fully stable. Use at own risk.
Python module that allows multi-hop SSH tunneling/port-forwarding.
While modules like Paramiko and sshtunnel provide excellent SSH and SSH tunnelling functionality (and is what is used under the hood for this module), neither directly support multi-hop SSH tunneling commonly required in heavily firewalled environments or complex network structure that may not have direct connectivity.
The logic to this module progressively creates tunnels (that use the previous tunnel if applicable) based on your input until the final tunnel is created which is what is reported as the localport for you to use as you please. This may look something like; desktop 22<>22 bastion1 22<>22 bastion2 22<>5432 database server. Refer to usage below.
pip install pytunneling
Note: tunnel_info
argument expects a list of dictionary objects containing keyword arguments noted in the sshtunnel docs corresponding to the bastion "hops", with the actual destination IP and port being target_ip
and target_port
.
from pytunneling import TunnelNetwork
from time import sleep
tunnel_info = [
{"ssh_address_or_host": "bastion1",
"ssh_username": "sshuser",
"ssh_pkey": "~/.ssh/id_rsa", # Note this refers to a local file on the machine that runs logic
#"ssh_private_key_password ": "somekeypassword", # If applicable
},
{"ssh_address_or_host": "bastion2",
"ssh_username": "sshuser",
"ssh_password": "somesecurepassword",
}
]
with TunnelNetwork(tunnel_info=tunnel_info, target_ip="database", target_port=5432) as tn:
print(f"Tunnel available at localhost:{tn.local_bind_port}")
while True:
# Use this tunnel
sleep(5)
Note: The CLI is not yet implemented
# TODO
# TODO
Feel free to raise any feature requests/problems/improvements as issue or pull request via GitHub.
FAQs
Python module that allows multi-hop SSH tunneling/port-forwarding
We found that pytunneling demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.