Complete project organization: move all DOS files to projects/dataforth-dos, create client folders, update Claude config
This commit is contained in:
14
add-ad2-key-to-nas.ps1
Normal file
14
add-ad2-key-to-nas.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
$password = ConvertTo-SecureString 'Paper123!@#' -AsPlainText -Force
|
||||
$cred = New-Object System.Management.Automation.PSCredential('INTRANET\sysadmin', $password)
|
||||
|
||||
Write-Host "Adding AD2 SSH Key to NAS..." -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
|
||||
Write-Host "[1] Getting public key from AD2..." -ForegroundColor Yellow
|
||||
$pubKey = Get-Content "$env:USERPROFILE\.ssh\id_ed25519.pub"
|
||||
Write-Host " Key: $($pubKey.Substring(0, 60))..." -ForegroundColor Gray
|
||||
|
||||
# Return the key to the main script
|
||||
return $pubKey
|
||||
}
|
||||
Reference in New Issue
Block a user