Configure rsh so that is does not prompt for a password

https‮‬://www.lautturi.com
Configure rsh so that is does not prompt for a password

The rsh (remote shell) command allows users to execute commands on a remote machine. By default, rsh prompts for a password when connecting to a remote machine.

To configure rsh so that it does not prompt for a password, you will need to set up passwordless authentication between the local and remote machines. This can be done using ssh key pairs.

  1. Generate an ssh key pair on the local machine by running the ssh-keygen command. Accept the default location for the key pair, and do not enter a passphrase:
ssh-keygen
  1. Copy the public key to the remote machine by running the following command:
ssh-copy-id user@remote

Replace user with the username on the remote machine, and remote with the hostname or IP address of the remote machine.

  1. Once the public key has been copied to the remote machine, you should be able to connect to the remote machine using rsh without being prompted for a password:
rsh user@remote command

Replace command with the command you want to execute on the remote machine.

Keep in mind that passwordless authentication using ssh key pairs is less secure than using a password, as it does not provide an additional layer of protection in the event that the private key is compromised. It is generally recommended to use ssh key pairs in combination with a passphrase to provide an additional level of security.

Created Time:2017-10-16 14:38:42  Author:lautturi