need to install putty, the command used is
plink:
[HTML]View Plaincopy
- PuTTY link:command-line Connection Utility
- Unidentified build, June 23 2015 11:43:58
- Usage:plink [Options] [[Email protected]]host [command]
- ("Host" can also be a PuTTY saved session name)
- Options:
- -V Print version information and exit
- -PGPFP print PGP key fingerprints and exit
- -V Show verbose messages
- -load sessname load settings from saved session
- -ssh-telnet-rlogin-raw-serial
- Force use of a particular protocol
- -p Port Connect to specified port
- -l user connect with specified username
- -batch Disable all interactive prompts
- The following options only apply to SSH connections:
- -PW PASSW Login with specified password
- -D [Listen-ip:]listen-port
- Dynamic socks-based Port forwarding
- -L [Listen-ip:]listen-port:host:port
- Forward local port to remote address
- -R [Listen-ip:]listen-port:host:port
- Forward remote port to local address
- -x-x enable/disable X11 Forwarding
- -a-a enable/disable Agent Forwarding
- -T-T enable/disable Pty Allocation
- -1-2 Force use of particular protocol version
- -4-6 force use of IPv4 or IPV6
- -C Enable compression
- -I key private key file for authentication
- -noagent Disable use of pageant
- -agent Enable use of pageant
- -m file read remote command (s) from file
- -S remote command is a SSH subsystem (SSH-2 only)
- -N don ' t start a shell/command (SSH-2 only)
- -NC Host:port
- Open tunnel in place of the session (SSH-2 only)
- -sercfg configuration-string (e.g. 19200,8,n,1,x)
- Specify the serial configuration (serial only)
would have been used plink to do tunnel proxy FQ use. Idle to look at the help of boredom, do not see do not know. A look at a frightsuccessfully conquered the once not realized function, special to record
Useful Scenario 1:The product is sent to the user later found a bug. But the installation of the location can only be remote, and the number is very large, this time need to upgrade the product how to do, it is not possible to SSH, or page configuration bar, then their own initiative SSH send command to send the use, a script loop ssh. wget firmware and upgrade one go. The company has met before .
Useful Scenario 2:now there are 1000 boards shipped to be labeled, and the MAC address was not recorded for some reason. This time how to do, it is not possible to go to the landing copy and paste. Save it to the printer, a script print out, it's so wayward
SSH login execute ls command :
echo y| plink-ssh [email protected]-PW password ls
SSH Login Run command.txt command in turn:
echo y| plink-ssh [email protected]-PW password-m command.txt
telnet Login to execute ifconfig and exit:
? Echo ' ifconfig; exit '| plink-telnet 192.168.1.1 Besides, there 's-ssh-telnet-rlogin-raw-serial.
based on these core commands, you can enjoy the
Learning
Test found SSH passed up to 1024 characters
Self-actively scripting SSH and Telnet sending commands and exiting (both Windows and Linux apply)