LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   SSH lock outs (https://www.linuxquestions.org/questions/linux-security-4/ssh-lock-outs-437122/)

tpe 04-20-2006 10:14 AM

SSH lock outs
 
Dear all,
I have the following problem: I use ssh and keychain in order to get the bakcups of my web site to my local pc. I do not have any problem with the procedure, but my ISP asked me to add a check before any scp action in order to ensure that the passphrase is entered correctly. keychain help is not very informative about the matter. Can someone help me?

satinet 04-20-2006 10:50 AM

what sort of check?

are you using ssh-agent to pass the passphrase between machines?

what's the point of what they are asking?

tpe 04-21-2006 02:43 AM

Quote:

Originally Posted by satinet
what sort of check?

I want to know if the passphrase is entered from the user. In the case of power fail, the script will try to scp the backup data either the user has loged in or not. I want to be sure that the passphrase is entered.

Quote:

Originally Posted by satinet
are you using ssh-agent to pass the passphrase between machines?

I use keychain

Quote:

Originally Posted by satinet
what's the point of what they are asking?

I have to download a lot of files. If the passphrase is not entered, then the web server will log a lot of unauthorized tries of scp. That is an abuse. Thus, before ANY scp I have to check that the passwordless login is working.

I tried to get the results of a simple command (eg date) using
Code:

scp user@host date > login.txt
but if the user had not entered the passphrase the file was empty. I found no way of retreive the "enter the passphrase" or any similar attempt.

satinet 04-21-2006 02:47 AM

what's "keychain" anyway? I'm not sure what it does....

is it similar to ssh-agent?

tpe 04-21-2006 02:49 AM

keychain is a wrapper of ssh-agent.
http://www.gentoo.org/proj/en/keychain/

satinet 04-21-2006 03:14 AM

are you doing this using a script?

could you use the exit value to exit the script if the wrong pass phrase is entered.....

if you're using this key chain i dont know how the wrong pass phrase can get entered....

also which way is the copy happening...?

tpe 04-21-2006 04:06 AM

That's exactly the problem. I have no exit codes. keychain works as wrapper...

satinet 04-21-2006 04:44 AM

how can it go wrong though if the passwords are being stored in the keychain. I dont understand........


All times are GMT -5. The time now is 12:13 AM.