add remote-shell function for handling sending command and command input