Device Systems: Linux Systems
Work content: Often switch between different device WiFi, the deployment of the portal via SSH connection device
Equipment Environment: The equipment environment is fixed, cannot install the software, the existing environment is,
SSH server side, does not support key authentication, only support password authentication
FTP client installed, no server side
Local WIN10:
Local WIN10 already configured FTP server
Job Requirements: High repeatability, so you want to automate your deployment with scripting
Working mode:
Download locally from SVN and package for updates
Connect the device via Xshell and then execute the script on the device (script free)
Ideas:
Device does not support FTP server, it can only be deployed via SSH connection trigger script
Find Opensshwindows can implement command line connection, install OK, add environment variable (omit)
Script implementation:
Netsh wlan connect name= "SSID-1" ssid= "SSID-1"
Set version= "Emadvbottom"
RD/S/q D:\ftp\AMOL_pkg
Del D:\ftp\AMOL_pkg.zip
SVN export https://XXX/svn/XXX/branches/%version% D:\ftp\AMOL_pkg
D:\softinstall\7-Zip\7z.exe a D:\ftp\AMOL_pkg.zip D:\ftp\AMOL_pkg
Echo%version%
echo "PSWD"
::p SWD
SSH [email protected]/root/deploy.sh
SVN log https://XXX/svn/XXX/branches/%version%-Q
Pause
Problem:
You need to determine "yes" and enter the password each time you execute "ssh [email protected]/root/deploy.sh"
The home directory of the user who created the login win10 under the OpenSSH installation directory (create the same directory as the user name under Home), no need to enter Yes
But the password one person needs to input, what solution?
This article is from the "Linux" blog, so be sure to keep this source http://loveall.blog.51cto.com/8658573/1877824
Automatic deployment of Devices (Linux systems)