I am new to the Linux operating system. I am using Red Hat Linux.
Can anyone tell me how to use remote services to login to a remote machine without providing the password?
Are there any commands in Linux or do I have to write a 'C' code for it ?
You do not have to write code.
First generate your key pair by
ssh-keygen
Second, use ssh-copy-id to distribute your public key
ssh-copy-id username@remote-machine
Note that you need to provide your password when running this command. After that, you can login the remote machine without password.
Here are some explanations for the commands from the manual page:
ssh-keygen
ssh-keygen generates, manages and converts authentication keys for
ssh(1). ssh-keygen can create RSA keys for use by SSH protocol version 1
and DSA, ECDSA or RSA keys for use by SSH protocol version 2. The type
of key to be generated is specified with the -t option. If invoked with-
out any arguments, ssh-keygen will generate an RSA key for use in SSH
protocol 2 connections.
ssh-copy-id
ssh-copy-id is a script that uses ssh to log into a remote machine
and append the indicated identity file to that machine's
~/.ssh/authorized_keys file.
Look into ssh, which can authenticate a login by using a public-key pair where you store the private part on the local machine and the public part on the remote one.