+++ date = "2022-09-13" tags = ["windows","pwsh"] title = "wingetでpwshをupgradeしてopensshで使う" slug = "windows-winget-pwsh-openssh" +++ wingetが便利になってたので、wingetで最新のpwsh(powershell)をインストールして使ってみます。 ```sh $ ssh windows $ winget -v # 7.2.6 $ winget upgrade microsoft.powershell # 7.3.0 $ winget install microsoft.powershell.preview $ pwsh-preview # winのpathは面倒なので適当に補完。下記でも行けると思いますが、念の為tabで変換するといいかも $ vim c:/programdata/ssh/sshd_config PasswordAuthentication no ForceCommand pwsh-preview $ net stop sshd $ net start sshd $ exit $ ssh windows powershell 7.3.0-preview $ winget upgrade --all ``` winget、便利。