早上在上 GCP 線上課程時聽老師說現在 Win10 的命令提示字元視窗已經具備 ssh 功能, 所以不需要 Puttty 也可以進行 ssh 遠端連線, 聽完馬上連線鄉下那台 Pi 3, 確實可用 :
開啟命令提示字元視窗後輸入 ssh 出現 usage 提示訊息表示已具備 ssh 功能 :
Microsoft Windows [版本 10.0.19041.928]
(c) Microsoft Corporation. 著作權所有,並保留一切權利。
C:\Users\User>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]
查看信箱中 Pi 每小時發送的最新外網 IP 為 1.254.23.172, 前面冠上 Pi 3 的使用者名稱 pi 與 @ :
C:\Users\User>ssh pi@1.254.23.172
The authenticity of host '1.254.23.172 (1.254.23.172)' can't be established.
ECDSA key fingerprint is SHA256:vt1QdJr4cBlAzcqsvRZaqbee04gAuygn4M4CHn5X100.
Are you sure you want to continue connecting (yes/no)? y (要回答 yes, 不能只用 y)
Please type 'yes' or 'no': yes
Warning: Permanently added '1.254.23.172' (ECDSA) to the list of known hosts.
pi@1.254.23.172's password: (輸入密碼)
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Mar 23 20:30:39 2021 from 1.172.127.60
pi@raspberrypi:~ $ pwd
/home/pi
pi@raspberrypi:~ $
雖然不錯用, 但我覺得還是 Putty 功能較多較好用, 例如 Putty 可以設定 log 紀錄操作過程, 也可以直接圈選複製螢幕內容, 而命令提示字元視窗則較陽春.
沒有留言:
張貼留言