Reputation: 1943
I have installed Cygwin using PowerShell scripting.
I am doing the following step manually:
Running a new cygwin bash shell (after the edit of cygwin.bat
) and enter:
mount --change-cygdrive-prefix /
chmod +r /etc/passwd /etc/group
chmod 755 /var
Start Cygwin bash shell and run ssh-host-config
. Answer yes to all the key generation questions.
Is it possible to automate these things in PowerShell scripts, like installing Cygwin, then doing steps 1 and 2 in a single shot?
Upvotes: 0
Views: 1168
Reputation: 980
Use this command:
bash.exe ssh-host-config --yes -u "Cygwinuser" -c "binmode ntsec tty" -w "pwd@123"
cygrunsrv -S sshd
Later go to services.msc to check if the service is running or not
Upvotes: 3