Commit ad561f73 by César Galvis

feat: deleted ssh server setup (useless)

parent b4212a43
......@@ -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
......
......@@ -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
......
# 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
# 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment