今までの Win7 環境では PuTTY を利用していた.
どこかで「Win10 は SSH クライアントがある」と読んだ記憶があった.
コマンドプロンプトで SSH と入力すると確かに入っている.
Microsoft Windows [Version 10.0.18362.113] (c) 2019 Microsoft Corporation. All rights reserved. C:\Users\Iwao>ssh usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface] [-b bind_address] [-c cipher_spec] [-D [bind_address:]port] [-E log_file] [-e escape_char] [-F configfile] [-I pkcs11] [-i identity_file] [-J [user@]host[:port]] [-L address] [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port] [-Q query_option] [-R address] [-S ctl_path] [-W host:port] [-w local_tun[:remote_tun]] destination [command] C:\Users\Iwao>where ssh C:\Windows\System32\OpenSSH\ssh.exe
起動方法は次のような感じ.
ssh -l ユーザ名 IP
C:\Users\Iwao>ssh -l Iwao -p 22xx 192.168.x.xxx The authenticity of host '[192.168.1.xxx]:22xx ([192.168.x.xxx]:2200)' can't be established. ECDSA key fingerprint is SHA256:1mYs5QSMxI2oljDmQWQ3rMG4tP0BKatu5N5fe555Ga0. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '[192.168.1.xxx]:22xx' (ECDSA) to the list of known hosts. Iwao@192.168.x.xxx's password: Iwao@DS115j:~$ ll total 56 drwxrwxrwx+ 8 Iwao users 4096 Apr 19 2018 . drwxrwxrwx+ 11 root root 4096 Jul 21 2017 .. drwxrwxrwx+ 5 Iwao users 4096 Apr 13 2017 CloudStation drwxrwxrwx+ 3 Iwao users 4096 Apr 19 2018 gcc_test -rwxrwxrwx+ 1 Iwao users 613 May 30 2017 set_ds_inc.sh drwxrwxrwx+ 2 Iwao users 4096 May 25 2017 .ssh drwxrwxrwx+ 2 Iwao users 4096 Sep 25 2017 Temp drwxrwxrwx+ 4 Iwao users 4096 Aug 2 2017 Test drwxrwxrwx+ 25 Iwao users 4096 Feb 14 22:38 www Iwao@DS115j:~$ pwd /var/services/homes/Iwao Iwao@DS115j:~$
起動を簡単にするために,次の内容で bat ファイル を作成.
cd %TMP%
ssh -l Iwao 192.168.0.123
次の様な指定も可能.
ssh -l Iwao DS115j
[…] Win10 の「コマンド プロンプト」から次の様なコマンドで接続できる. ssh -l Iwao as5202t […]