Open temporary SSH sessions in PowerShell
This commit is contained in:
parent
e01df5b988
commit
3522f87dea
|
|
@ -134,12 +134,13 @@ $addresses = @(
|
|||
)
|
||||
|
||||
Write-Host ''
|
||||
Write-Host 'Temporary SSH access is ready. From CachyOS, use one of:'
|
||||
foreach ($address in $addresses) { Write-Host " ssh $env:USERNAME@$address" }
|
||||
Write-Host 'Temporary SSH access is ready. From CachyOS, open PowerShell directly with one of:'
|
||||
foreach ($address in $addresses) { Write-Host " ssh -t $env:USERNAME@$address powershell.exe -NoLogo -NoProfile" }
|
||||
if ($addresses.Count -eq 0) {
|
||||
Write-Warning 'No usable IPv4 address was found. Run ipconfig and use the address of the Private network adapter.'
|
||||
}
|
||||
Write-Host ''
|
||||
Write-Host 'Use the Windows account password, not a Windows Hello PIN.'
|
||||
Write-Host "If a normal SSH login opens cmd.exe, type 'powershell.exe' before using PowerShell commands such as irm."
|
||||
Write-Host 'Disable access afterward with:'
|
||||
Write-Host " `$env:CONFIG_CENTRAL_TEMP_SSH='disable'; irm '$scriptUrl' | iex"
|
||||
|
|
|
|||
Loading…
Reference in New Issue