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
e0e33dc4
Commit
e0e33dc4
authored
Apr 08, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: added new ssh scripts for connections with private key
parent
7cccd522
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
2 deletions
+36
-2
ssh-connection-private-key.sh
src/scripts/bash/ssh-connection-private-key.sh
+16
-0
ssh-tunnel-plain-text.sh
src/scripts/bash/ssh-tunnel-plain-text.sh
+2
-2
ssh-tunnel-private-key.sh
src/scripts/bash/ssh-tunnel-private-key.sh
+18
-0
No files found.
src/scripts/bash/ssh-connection-private-key.sh
0 → 100644
View file @
e0e33dc4
#!/bin/bash
# Connect to SSH server using HTTP proxy
# Proxy server data
PROXY_SERVER
=
windows-vpn
PROXY_PORT
=
3128
# SSH server data
SSH_SERVER
=
domain.com
SSH_USER
=
user
SSH_PORT
=
22
SSH_PRIVATE_KEY
=
key
# Connect to SSH server with proxy
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-i
"
$SSH_PRIVATE_KEY
"
-p
"
$SSH_PORT
"
"
$SSH_USER
@
$SSH_SERVER
"
\ No newline at end of file
src/scripts/bash/ssh-tunnel-plain-text.sh
View file @
e0e33dc4
...
...
@@ -15,4 +15,4 @@ SSH_TUNNEL_REMOTE_PORT=80
SSH_DATA
=
ssh-data.txt
# Make SSH tunnel with proxy
sshpass
-f
$SSH_DATA
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-o
PreferredAuthentications
=
password
-o
PubkeyAuthentication
=
no
-L
$SSH_TUNNEL_LOCAL_PORT
:localhost:
$SSH_TUNNEL_REMOTE_PORT
-p
"
$SSH_PORT
"
$SSH_USER
@
$SSH_SERVER
\ No newline at end of file
sshpass
-f
$SSH_DATA
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-o
PreferredAuthentications
=
password
-o
PubkeyAuthentication
=
no
-NL
$SSH_TUNNEL_LOCAL_PORT
:localhost:
$SSH_TUNNEL_REMOTE_PORT
-p
"
$SSH_PORT
"
$SSH_USER
@
$SSH_SERVER
\ No newline at end of file
src/scripts/bash/ssh-tunnel-private-key.sh
0 → 100644
View file @
e0e33dc4
#!/bin/bash
# Generate SSH tunnel using HTTP proxy
# Proxy server data
PROXY_SERVER
=
windows-vpn
PROXY_PORT
=
3128
# SSH server data
SSH_SERVER
=
domain.com
SSH_USER
=
user
SSH_PORT
=
22
SSH_TUNNEL_LOCAL_PORT
=
80
SSH_TUNNEL_REMOTE_PORT
=
80
SSH_PRIVATE_KEY
=
key
# Make SSH tunnel with proxy
ssh
-o
ProxyCommand
=
"corkscrew
$PROXY_SERVER
$PROXY_PORT
%h %p"
-i
"
$SSH_PRIVATE_KEY
"
-NL
$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