3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PowerShell による Windows の SSH クライアントの有効化

Last updated at Posted at 2020-01-19

管理者としてPowerShellを起動します

SSHのインストール

> Get-WindowsCapability -Online | ? Name -Match ssh


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

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

> Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

ssh-agent の有効化

# 自動起動
> Set-Service ssh-agent -StartupType Automatic
# 開始
> Start-Service ssh-agent

ssh コマンド周りはUnixと変わらないです。

> ssh-keygen -t ed25519
> ssh-add ~\.ssh\id_ed25519
> code ~\.ssh\config
~.ssh\config
Host HOSTNAME
    HostName xxx.xxx.xxx.xxx
    User USERNAME
    IdentityFile ~\.ssh\id_ed25519
> ssh HOSTNAME
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?