I want to connect to a remote server and execute some commands, how can I achieve this?

We can use telnet to do this:

telnet hostname –l user

>Enter password

>Write the command to execute

>quit

Category: Shell Scripting Interview Questions.