Through the shell command ssh user @ host I can connect to the terminal of the remote server. Is it possible to immediately open the remote server terminal through a shell command and automatically enter a command there?

    1 answer 1

    ssh login @ myip -p myport 'ls';

    • Thank! Did not think to run the command through the connection port) - StrangeNode
    • -p and the port itself is needed only when the non-standard (22) port for ssh. - Jenyokcoder
    • @StrangeNode, ssh can list not one page of useful things, such as: communication channels over the established connection, tunneling, proxying. - 0andriy