Skip to content

Latest commit

 

History

History
56 lines (32 loc) · 2.51 KB

install_openssh_powershell.rst

File metadata and controls

56 lines (32 loc) · 2.51 KB

Powershellを使ってOpenSSHをインストールする

ssh <username>@<hostname>.local (または ssh <username>@<IP address> )を使ってRaspberry Piに接続しようとすると、以下のエラーメッセージが表示されることがあります。

ssh: The term 'ssh' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.

これは、お使いのコンピュータシステムが古く、 OpenSSH がプリインストールされていないことを意味します。以下のチュートリアルに従って手動でインストールする必要があります。

  1. Windowsデスクトップの検索ボックスに powershell と入力し、 Windows PowerShell を右クリックして、表示されるメニューから Run as administrator を選択します。

    image

  2. 次のコマンドを使用して OpenSSH.Client をインストールします。

    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
  3. インストール後、以下の出力が返されます。

    Path          :
    Online        : True
    RestartNeeded : False
  4. 次のコマンドを使用してインストールを確認します。

    Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
  5. これで OpenSSH.Client が正常にインストールされたことがわかります。

    Name  : OpenSSH.Client~~~~0.0.1.0
    State : Installed
    
    Name  : OpenSSH.Server~~~~0.0.1.0
    State : NotPresent

    Warning

    上記のプロンプトが表示されない場合、Windowsシステムがまだ古いことを意味し、 login_windows のようなサードパーティのSSHツールのインストールをお勧めします。

  6. PowerShellを再起動し、管理者として実行し続けます。この時点で、 ssh コマンドを使用してRaspberry Piにログインすることができ、以前に設定したパスワードを入力するように求められます。

    image