0
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 1 year has passed since last update.

Windows SSH接続方法

Posted at

sshの接続方法
下記参考
https://win2012r2.com/2021/10/16/test-netconnection-fails/

仮想サーバ(192.168.84.130)と外部からのやり取り
仮想サーバと外部PCのポート22は開けておくこと

手順
①外部のPC、PowerShellで
PS C:\Users\ [ユーザ名]> Test-NetConnection 192.168.84.130 -Port 22
警告: TCP connect to (192.168.84.130 : 22) failed ComputerName : 192.168.84.130 RemoteAddress : 192.168.84.130
RemotePort : 22
InterfaceAlias : VMware Network Adapter VMnet8
SourceAddress : 192.168.84.1
PingSucceeded : True
PingReplyDetails (RTT) : 3 ms
TcpTestSucceeded : False

②TcpTestSucceeded : Falseになっているので
OpenSSHサーバを仮想サーバ側にインストール
設定>アプリ>オプション機能>機能の追加から行う

③その後、OpenSSHServerのサービスの開始
コントロールパネル>システムとセキュリティ>管理ツール>サービス>OpenSSHServer
サービスの開始クリック

④仮想サーバ側で
C:\Users[ユーザ名]>netstat -an | find "LISTEN"
でSSHのポート22を探す

⑤外部PCから下記コマンドを再度cmdに入力
PS C:\Users\ [ユーザ名]> Test-NetConnection 192.168.84.130 -Port 22

ComputerName : 192.168.84.130
RemoteAddress : 192.168.84.130
RemotePort : 22
InterfaceAlias : VMware Network Adapter VMnet8
SourceAddress : 192.168.84.1
TcpTestSucceeded : True

これでSSHの接続設定は完了

0
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
0
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?