Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
windows-vm
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pem
windows-vm
Commits
cd26d17d
Commit
cd26d17d
authored
Apr 02, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added docs for ssh connections
parent
0557aa63
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
0 deletions
+53
-0
README.md
README.md
+19
-0
ssh-connection-plain-text.sh
src/scripts/bash/ssh-connection-plain-text.sh
+16
-0
ssh-tunnel-plain-text.sh
src/scripts/bash/ssh-tunnel-plain-text.sh
+18
-0
No files found.
README.md
View file @
cd26d17d
...
@@ -85,6 +85,25 @@ git config --global "http.$GIT_PRIVATE_SERVER.proxy" $PROXY_SERVER
...
@@ -85,6 +85,25 @@ git config --global "http.$GIT_PRIVATE_SERVER.proxy" $PROXY_SERVER
cat
~/.gitconfig
cat
~/.gitconfig
```
```
#### Add proxy in NMAP
```
sh
nmap
--proxies
http://windows-vpn:3128
$PRIVATE_DOMAIN_OR_IP
```
#### Add proxy for SSH connection
> `corkscrew` required
```
sh
# Install corkscrew (in Debian-based distributions)
sudo
apt
-y
install corkscrew
# Install sshpass password provider for plain text data
sudo
apt
-y
install sshpass
```
Copy and check the bash scripts
[
here
](
src/scripts/bash/
)
.
## Useful commands
## Useful commands
```
sh
```
sh
...
...
src/scripts/bash/ssh-connection-plain-text.sh
0 → 100644
View file @
cd26d17d
#!/bin/bash
# Connect to SSH server using HTTP proxy
# Add SSH server domain or IP
PROXY_SERVER
=
windows-vpn
PROXY_PORT
=
3128
SSH_SERVER
=
192.168.11.106
SSH_USER
=
pembd
SSH_PORT
=
22
# Make a "ssh-data.txt" file wit the plain text password in the first line
SSH_DATA
=
ssh-data.txt
# Connect to SSH server by proxy
sshpass
-f
$SSH_DATA
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-p
"
$SSH_PORT
"
"
$SSH_USER
@
$SSH_SERVER
"
\ No newline at end of file
src/scripts/bash/ssh-tunnel-plain-text.sh
0 → 100644
View file @
cd26d17d
#!/bin/bash
# Generate SSH tunnel using HTTP proxy
# Add SSH server domain or IP
PROXY_SERVER
=
windows-vpn
PROXY_PORT
=
3128
SSH_SERVER
=
192.168.11.106
SSH_USER
=
pembd
SSH_PORT
=
22
SSH_TUNNEL_LOCAL_PORT
=
5533
SSH_TUNNEL_REMOTE_PORT
=
5533
# Make a "ssh-data.txt" file wit the plain text password in the first line
SSH_DATA
=
ssh-data.txt
# Make SSH tunnel with proxy
sshpass
-f
$SSH_DATA
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-L
$SSH_TUNNEL_LOCAL_PORT
:localhost:
$SSH_TUNNEL_REMOTE_PORT
-p
"
$SSH_PORT
"
$SSH_USER
@
$SSH_SERVER
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment