Remove unnecessary libs, typos and add ssh compatibility

Check env var SSH_ORGININAL_COMMAND to provide a solution to use snode
as alternative ssh shell.

Signed-off-by: refnode <refnode@gmail.com>