How to disable/bypass passphrase prompt in ssh?

Hi Folks,

I have setup a passwordless connection from my Linux ( source) machine toSolaris ( destination ) machine. I have added passphrase while creating the rsa key. Now problem is each time when i make a connection i have to give the passphrase to make connection. How to override this ?

I have browsed through web pages and found that ssh-agent and ssh-add should be used to fix this. But even when using it i have to enter the passphrase atleast once when i open my session. I want to completely avoid it .

I have tried BatchMode=yes option but that throws an error like below

[chidori@test ~]$ ssh -o BatchMode=yes dummy@testbox.sol.box
Permission denied (gssapi-keyex,gssapi-with-mic,publickey,password,keyboard-interactive).
[chidori@test ~]$

How to overcome this passphrase prompt without going for no passphrase ??

That's what key passwords are there for. They guarantee that the key cannot be used unless a human is there to authorize it.

There is no backdoor do it. The key is actually encrypted. Without the password, the key is scrambled.

If you don't want to type in a password, create a key without a password.

Thanks for the explanation.

I have this strange question in mind . As the pages from google say to add ssh-agent and ssh-add commands in user profile so that ssh agent starts each time you login as user and adds the key.

After this it would be in a prompt which would waiting for passphrase input to be given by user. Can automate this particular step using expect tool ?

I know its security risk but just being curious to know if it can be done via expect / any other tool

Injecting passwords is not so much a "security risk" as "completely forgetting the point". Perhaps save yourself some trouble and just remove the password instead.

I expect you could do it with expect, but don't really see any reason to do so. It's no more secure than not having a password.

yeah you are right. its better to remove the passphrase anyway just exploring unix features :slight_smile:
Thanks for your suggestions on this