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
ad561f73
Commit
ad561f73
authored
Mar 21, 2025
by
César Galvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: deleted ssh server setup (useless)
parent
b4212a43
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
33 deletions
+0
-33
README.md
README.md
+0
-2
Vagrantfile
Vagrantfile
+0
-8
SshServerEnable.ps1
src/scripts/SshServerEnable.ps1
+0
-7
SshServerInstall.ps1
src/scripts/SshServerInstall.ps1
+0
-16
No files found.
README.md
View file @
ad561f73
...
...
@@ -81,8 +81,6 @@ Copy your `FortiClient` backup file in `./files` folder and follow these steps:
#### Enable proxy
```
sh
# Run SOCKS5 tunnel
ssh
-D
1080
-N
-f
vagrant@127.0.0.1
-p
2244
```
## Useful commands
...
...
Vagrantfile
View file @
ad561f73
...
...
@@ -23,10 +23,6 @@ Vagrant.configure("2") do |config|
vb
.
cpus
=
1
end
# Enable SSH and SOCKS5 ports
config
.
vm
.
network
"forwarded_port"
,
guest:
22
,
host:
2244
,
id:
"ssh"
config
.
vm
.
network
"forwarded_port"
,
guest:
1080
,
host:
1080
,
id:
"socks5"
# Enable UI
config
.
vm
.
provider
"virtualbox"
do
|
vb
|
vb
.
gui
=
true
...
...
@@ -34,10 +30,6 @@ Vagrant.configure("2") do |config|
# Provisioning
## Run the external script to install SSH Server
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/SshServerInstall.ps1"
## Run the external script to enable SSH Server
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/SshServerEnable.ps1"
## Run the external script to install Chocolatey
config
.
vm
.
provision
"shell"
,
path:
"src/scripts/ChocolateyInstall.ps1"
## Install Chocolatey packages
...
...
src/scripts/SshServerEnable.ps1
deleted
100644 → 0
View file @
b4212a43
# Enable and start SSH Service
Start-Process
powershell -ArgumentList
"Start-Service sshd"
-Verb RunAs
Set-Service
-Name sshd -StartupType Automatic
# Add SSH firewall rule
New-NetFirewallRule
-Name
"SSH"
-DisplayName
"SSH"
-Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
\ No newline at end of file
src/scripts/SshServerInstall.ps1
deleted
100644 → 0
View file @
b4212a43
# Install OpenSSH
$sshFeature
=
Get-WindowsCapability
-Online |
Where
-Object Name -like
'OpenSSH.Server*'
if
(
$sshFeature
.State -ne
'Installed'
)
{
Write-Output
"Installing OpenSSH Server..."
Add-WindowsCapability
-Online -Name
$sshFeature
.Name
}
else
{
Write-Output
"OpenSSH Server is already installed."
}
# Wait for the installation to finish and restart the machine
$restartNeeded
=
(
Get-WindowsCapability
-Online |
Where
-Object Name -like
'OpenSSH.Server*'
)
.RestartNeeded
if
(
$restartNeeded
-eq
$true
)
{
Write-Output
"Restart to complete the OpenSSH installation..."
Restart-Computer
-Force
}
\ 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