How to disable/bypass passphrase prompt in ssh?


 
Thread Tools Search this Thread
Operating Systems Solaris How to disable/bypass passphrase prompt in ssh?
# 1  
Old 01-07-2013
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

Code:
[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 ??

Last edited by chidori; 01-07-2013 at 05:19 PM..
# 2  
Old 01-07-2013
Quote:
Originally Posted by chidori
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.
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.

Last edited by Corona688; 01-07-2013 at 05:31 PM..
# 3  
Old 01-08-2013
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
# 4  
Old 01-08-2013
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.
# 5  
Old 01-08-2013
yeah you are right. its better to remove the passphrase anyway just exploring unix features Smilie
Thanks for your suggestions on this
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Supply passphrase for ssh in script

I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh). This particular script will be fired from cron. Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies

2. Cybersecurity

Disable SSH 1.99 version?

Hello. My security audit reconise SSH 1.99 protocol version allowed. But in my sshd_config config is only: SSH version: How can I disable support for ssh protocol 1.99 version? (1 Reply)
Discussion started by: jabalv
1 Replies

3. OS X (Apple)

ssh passphrase issues - Mac OS X

ssh passphrase permissions issues I will try to be as thorough as possible, but keep in mind I am a designer, not a programmer... I do have linux mdadm experience and am reasonably comfortable behind the terminal, but I may need things to be spelled out for me. I am using 2 new-ish Macs with... (1 Reply)
Discussion started by: Ahab the Eskimo
1 Replies

4. UNIX for Advanced & Expert Users

ssh: require passphrase from some servers but not others

We have a number of linux clusters running Oracle. The clusters require that all member nodes have promptless/passwordless login through ssh (ie. the keys were created with null passphrases). We also have a management server that is not a member of any cluster but routinely connects to nodes of all... (3 Replies)
Discussion started by: Squeakygoose
3 Replies

5. Shell Programming and Scripting

How can I bypass the Prompt in SFTP

I am on a sun solaris server and trying to create a script that will test if SFTP is up and running on a remote server (which could be unix or windows). My thought was to simply invoke sftp and if I get the prompt ofr "Password" then that is an indication that the service is running and I am... (2 Replies)
Discussion started by: pierluigi22
2 Replies

6. Shell Programming and Scripting

automated ssh with provision for passphrase

Below is a part of my shell script. Currently I have shared the public key of the client with the host, therefore I will not be prompted for the password. The key that has been created on the client is also without a passphrase. If it is created with a passphrase, the code I have will not... (3 Replies)
Discussion started by: farahzaiba
3 Replies

7. Solaris

rm -r does not disable interactive prompt

For some reason, when I try to delete files using rm -r, it doesn not disable the interactive prompt. Any ideas? I am on a sun solaris 10 box. (9 Replies)
Discussion started by: mrx1350
9 Replies

8. Solaris

SSH passphrase and Password

Hello all, Today we run ssh with keys on all our Solaris systems. But I wounder: Is it possible to add another authentication too. Like the os/system regular password so the users first need to enter the ssh phasssphrase and after that they need to enter the os/system password. I need like... (3 Replies)
Discussion started by: jOOc
3 Replies

9. UNIX for Advanced & Expert Users

passphrase and ssh authentication

In which case could be better don't use a passphrase creating an authentication key for ssh comunications? Thanks in advance. (1 Reply)
Discussion started by: Minguccio75
1 Replies

10. UNIX for Advanced & Expert Users

ssh - at login Passphrase for key required

Hello, I want to use a shell-script to transfer data over sftp. I donīt find a way to login in automatically. I tried to send the password in a script like possible with ftp sftp user@server << cmd password cd /distant/directory lcd /local/directoryget ssh_install get ( or put) your... (2 Replies)
Discussion started by: olso
2 Replies
Login or Register to Ask a Question