In addition to interactive access, WCS CLI supports public key authorization. This feature allows to enter to CLI and run some CLI commands from script, for example.
1. Create public and privet keys with command:
ssh-keygen -t rsa
2. Convert public key to pem with command
ssh-keygen -f id_rsa.pub -m 'PEM' -e > public.pem
3. Enter to CLI:
ssh -p 2000 admin@localhost
4. Enter the command
add authorized_key -f /homedir/.ssh/public.pem
where /homedir/.ssh/public.pem is the full name of public key in pem format.
This comman imports public key and places it to /usr/local/FlashphonerWebCallServer/.ssh/authorized_keys file
5. Restart WCS
Enter to CLI with command
ssh -p 2000 admin@localhost -i /homedir/.ssh/id_rsa
where /homedir/.ssh/id_rsa is private key file full name.