最後更新: 2024-06-11
目錄
- Putty
- puttytray
- MyEnTunnel
- superputty
- Win10 的 ssh
Putty
在 M$ Windows 上的主力 ssh program 來
Putty Session 位置
HKEY_USERS\<SID>\Software\SimonTatham\PuTTY\Sessions\<IP>
OR
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\<IP>
Start putty session by shortcut
- "path/to/putty.exe" -ssh user@ip -pw password
- "path/to/putty.exe" -load "mysession"
FAQ
As of PuTTY 0.71, some lines of text in the terminal window are marked with a small copy of the PuTTY icon (as far as pixels allow).
It indicates that that line of text was generated by PuTTY itself, and not generated by the server and sent to PuTTY.
putty arguments
# load a saved session
-load
# Selecting a protocol:
-ssh, -telnet, -rlogin, -raw, -serial
# specify a login name
-l
# specify a port number
-P
# specify a password
-pw
# specify an SSH private key
-i
Run Script
# read a remote command or script from a file
-m
Port Forwarding
# set up port forwardings
-L, -R and -D
# suppress starting a shell or command
-N
# control pseudo-terminal allocation
-t and -T
puttytray
HomePage: https://puttytray.goeswhere.com/
功能:
- Minimizing to the system tray
on "CTRL + minimize", always or directly on startup
- Session from file (right click title / change settings / session / sessions from file)
與 puttytray.exe 同位置會有個 Hide folder 叫 "sessions"
- Always on top (right click title / always on top)
- Icons are customisable (right click title / change settings / window / behaviour / adjust the icon)
- 3 合一功能的 CLI
putty.exe [--as-putty] standard-putty-options
putty.exe --as-gen [--ssh-keygen] standard-puttygen-options
putty.exe --as-agent [--startup] [--confirm] standard-pageant-options
--startup won't open the Pageant Key List view, but still asks for password if necessary
MyEnTunnel
DL link
https://github.com/feralhosting/feralfilehosting/tree/master/Feral%20Wiki/SSH/SSH%20tunnels%20-%20MyEnTunnel
* MyEnTunnel Version 3.6.1 use plink 0.63
Optional Arguments:
-ssh -N don't start a shell/command -2 version 2
# Enable Loopback Pinging
-L 127.0.0.1:64000:127.0.0.1:64000 -R 127.0.0.1:64000:127.0.0.1:64001
netstat -n | findstr 64000
# Enable Echo Service Pinging
-L 127.0.0.1:64000:127.0.0.1:7
status log:
[16:41:54 10/03] Launching: plink.exe 192.168.88.178 -N -ssh -2 -P 22 -l "root" -L 2211:192.168.8.11:22 -L 2212:192.168.8.12:22 -L 127.0.0.1:64000:127.0.0.1:64000 -R 127.0.0.1:64000:127.0.0.1:64001 [16:41:58 10/03] plink.exe: [email protected]'s password: [16:41:58 10/03] Sending password [16:42:08 10/03] Connection is stable
superputty
* OpenSource
* MultiTab
https://github.com/jimradford/superputty
Save password
Tools > Options > GUI tab > Security section > Allow plain text passwords ..
Select YOUR Session > right click > Edit > 在 Extra PuTTY Arguments 填
-pw YOUR_PW
Set ssh key
與 save password 差不多. e.g.
-i "%homepath%\ssh_keys\Home\devserver.ppk"
Win10 的 ssh
Install
GUI: Settings > System > Optional Features
CLI
# OnPowerShell
Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*'
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
Configuration
Win10 及 Win11 帶有 Openssh(C:\Windows\System32\OpenSSH)
configuration file in the following order:
- By launching ssh.exe with the -F parameter
- A user's configuration file at %userprofile%\.ssh\config
- The system-wide configuration file at %programdata%\ssh\ssh_config