StudyNext Xeon SSH Setup

Xeon機のWindowsで、管理者PowerShellを開いて下を貼る。

OpenSSH Server、sshd自動起動、Firewall、起動時IPレポート、現在のipconfigまで全部入り。

Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType Automatic
if (-not (Get-NetFirewallRule -Name OpenSSH-Server-In-TCP -ErrorAction SilentlyContinue)) {
  New-NetFirewallRule -Name OpenSSH-Server-In-TCP -DisplayName "OpenSSH Server (sshd)" -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22
}
New-Item -ItemType Directory -Force C:\StudyNext | Out-Null
@'
$out = "$env:PUBLIC\Desktop\StudyNext-Xeon-IP.txt"
"=== StudyNext Xeon SSH Info ===" | Set-Content $out
"Time: $(Get-Date)" | Add-Content $out
"User: $(whoami)" | Add-Content $out
"Computer: $env:COMPUTERNAME" | Add-Content $out
"" | Add-Content $out
"=== IPv4 ===" | Add-Content $out
Get-NetIPConfiguration | Where-Object IPv4Address | ForEach-Object {
  "$($_.InterfaceAlias)  $($_.IPv4Address.IPAddress)"
} | Add-Content $out
"" | Add-Content $out
"=== ipconfig ===" | Add-Content $out
ipconfig | Add-Content $out
'@ | Set-Content C:\StudyNext\sn-ip-report.ps1 -Encoding UTF8
schtasks /Create /TN "StudyNext IP Report" /SC ONSTART /TR "powershell -NoProfile -ExecutionPolicy Bypass -File C:\StudyNext\sn-ip-report.ps1" /RL HIGHEST /F
powershell -NoProfile -ExecutionPolicy Bypass -File C:\StudyNext\sn-ip-report.ps1
Get-Content "$env:PUBLIC\Desktop\StudyNext-Xeon-IP.txt"

終わったら、表示されたIPv4にこのPCから接続。

ssh ユーザー名@IPv4アドレス

ユーザー名はXeon側で表示される User: の後ろ。例: PCNAME\kousuke なら kousuke

エラーを僕に見せる

PowerShellの赤いエラーや出力をここに貼って、「報告文をコピー」を押す。

ここに報告文が出ます。