Agent documentation
Run the Agent by operating system
Each operating system has its own collapsible setup section. Open only the section you need.
What this page is for:
Prepare SSH on the remote computer, start the SSH-LINK Agent manually, and choose between SSH key login or username/password login on Windows.
Windows Windows Agent
Run PowerShell as Administrator to install OpenSSH. Then start the Agent in a normal PowerShell window when you want access.
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
New-NetFirewallRule -Name sshd -DisplayName "OpenSSH Server (sshd)" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
& "C:\Program Files\SSH-LINK\ssh-link-agent.exe" --agent-id WINDOWS-PC --token AGENT_TOKEN
Windows YAML example
Windows SSH login
Use SSH keys when possible. Username/password also works for a local Windows account with admin rights when password authentication is enabled.
SSH key login for an Administrator user:
New-Item -ItemType Directory -Force C:\ProgramData\ssh | Out-Null
notepad C:\ProgramData\ssh\administrators_authorized_keys
icacls C:\ProgramData\ssh\administrators_authorized_keys /inheritance:r
icacls C:\ProgramData\ssh\administrators_authorized_keys /grant "Administrators:F" /grant "SYSTEM:F"
Restart-Service sshd
Username/password login:
$Password = Read-Host "Enter password for sshlink" -AsSecureString
New-LocalUser -Name "sshlink" -Password $Password -FullName "SSH-LINK Admin"
Add-LocalGroupMember -Group "Administrators" -Member "sshlink"
$cfg = "C:\ProgramData\ssh\sshd_config"
if (Select-String -Path $cfg -Pattern "^\s*#?\s*PasswordAuthentication\s+" -Quiet) {
(Get-Content $cfg) -replace "^\s*#?\s*PasswordAuthentication\s+.*", "PasswordAuthentication yes" | Set-Content $cfg
} else {
Add-Content $cfg "`nPasswordAuthentication yes"
}
Restart-Service sshd
After the Manager opens a local tunnel, connect from the Mac with ssh sshlink@127.0.0.1 -p 2222.
macOS macOS Agent
Enable Remote Login in System Settings, or with the command below, then run the agent binary.
sudo systemsetup -setremotelogin on
./ssh-link-agent --agent-id MAC-MINI --token AGENT_TOKEN
macOS YAML example
Linux Linux Agent
Install and start OpenSSH, then run the Agent from your shell or terminal multiplexer.
sudo apt update
sudo apt install -y openssh-server
sudo systemctl enable --now ssh
./ssh-link-agent --agent-id UBUNTU-PC --token AGENT_TOKEN
Linux YAML example