You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Thomas Fischer (JIRA)" <ji...@codehaus.org> on 2006/12/29 18:35:09 UTC

[jira] Created: (WAGONSSH-55) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Although a password is given in the settings.xml for a scp url, a password prompt still appears
-----------------------------------------------------------------------------------------------

                 Key: WAGONSSH-55
                 URL: http://jira.codehaus.org/browse/WAGONSSH-55
             Project: wagon-ssh
          Issue Type: Wish
    Affects Versions: 1.0-alpha-7
         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
            Reporter: Thomas Fischer
            Priority: Minor


I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.

I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.

If I replace the code in the method promptKeyboardInteractive, which was originally
        return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
by
        String[] result = new String[prompt.length];
        result[0] = userInfo.getPassword();
        return result;
(which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.

I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (WAGON-180) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed WAGON-180.
------------------------------

      Assignee: Brett Porter
    Resolution: Fixed

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGON-180
>                 URL: http://jira.codehaus.org/browse/WAGON-180
>             Project: Maven Wagon
>          Issue Type: Wish
>          Components: wagon-ssh
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Assignee: Brett Porter
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGONSSH-55) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Thomas Fischer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGONSSH-55?page=comments#action_83793 ] 
            
Thomas Fischer commented on WAGONSSH-55:
----------------------------------------

I checked the PasswordAuthentication setting and it is set to "no" in sshd_config. Setting it to "yes" stops the prompts for the password. In my particular case, this solves the problem. Maybe this should be documented in the maven docs (e.g. in the "getting started"  guide, section "How do I deploy my jar in my remote repository?"). I'd be happy to provide a docs patch.

I was not aware that the ssh server could ask for something else than a password. How would an agent know which answer should be sent to which question ?

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGONSSH-55
>                 URL: http://jira.codehaus.org/browse/WAGONSSH-55
>             Project: wagon-ssh
>          Issue Type: Wish
>    Affects Versions: 1.0-alpha-7
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Priority: Minor
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WAGON-180) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated WAGON-180:
-------------------------------

    Fix Version/s: 1.0-beta-3

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGON-180
>                 URL: http://jira.codehaus.org/browse/WAGON-180
>             Project: Maven Wagon
>          Issue Type: Wish
>          Components: wagon-ssh
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Priority: Minor
>             Fix For: 1.0-beta-3
>
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGONSSH-55) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Juan F. Codagnone (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGONSSH-55?page=comments#action_83631 ] 
            
Juan F. Codagnone commented on WAGONSSH-55:
-------------------------------------------

The server is sending "keyboard-interactive", not "password" or "key" so the server could ask for a question different that the user/password ("PasswordAuthentication no" in sshd_config?).  See WAGONSSH-13. 

I think that the real solution would be to have an agent to store the credentials.

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGONSSH-55
>                 URL: http://jira.codehaus.org/browse/WAGONSSH-55
>             Project: wagon-ssh
>          Issue Type: Wish
>    Affects Versions: 1.0-alpha-7
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Priority: Minor
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WAGONSSH-55) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Thomas Fischer (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/WAGONSSH-55?page=comments#action_83802 ] 
            
Thomas Fischer commented on WAGONSSH-55:
----------------------------------------

Added documentation patch to the getting started guide in MNG-2737

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGONSSH-55
>                 URL: http://jira.codehaus.org/browse/WAGONSSH-55
>             Project: wagon-ssh
>          Issue Type: Wish
>    Affects Versions: 1.0-alpha-7
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Priority: Minor
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Moved: (WAGON-180) Although a password is given in the settings.xml for a scp url, a password prompt still appears

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/WAGON-180?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter moved WAGONSSH-55 to WAGON-180:
--------------------------------------------

    Affects Version/s:     (was: 1.0-alpha-7)
          Component/s:     (was: wagon-ssh)
                       wagon-ssh
                  Key: WAGON-180  (was: WAGONSSH-55)
              Project: Maven Wagon  (was: wagon-ssh)

> Although a password is given in the settings.xml for a scp url, a password prompt still appears
> -----------------------------------------------------------------------------------------------
>
>                 Key: WAGON-180
>                 URL: http://jira.codehaus.org/browse/WAGON-180
>             Project: Maven Wagon
>          Issue Type: Wish
>          Components: wagon-ssh
>         Environment: ssh client on Windows XP, ssh server on SUSE Linux Enterprise Server 10
>            Reporter: Thomas Fischer
>            Priority: Minor
>
> I want to deploy an artifact on a remote repository using scp (not scpexe) by issuing the command mvn deploy. In the settings.xml, I have specified an username and the correct password for the user, and I made sure that the settings file is read by maven. Still, wagon prompts me for a password when establishing the ssh connection for every ssh access (6 times for deploying a plugin). If I enter the correct password 6 times, deployment works but typing the password so often is very tedious.
> I tried to look into the code and although I am not familiar with ssh and jsch, it appears to me that the problem occurs if the ssh server sends back the authentication method should be "keyboard-interactive" (see jsch's Session.connect(int) method). Then Jsch does not use the provided password but tries to prompt it from console. This ends up in Wagon's UserInfoUIKeyboardInteractiveProxy.promptKeybordInteractive() method.
> If I replace the code in the method promptKeyboardInteractive, which was originally
>         return interactive.promptKeyboardInteractive( destination, name, instruction, prompt, echo );
> by
>         String[] result = new String[prompt.length];
>         result[0] = userInfo.getPassword();
>         return result;
> (which is a bad hack in my opinion), then the authentication works without having to type in the password. I did not dig deep enough into the wagon code to see if there is a clean way to solve this, but perhaps somebody else has an idea.
> I'd be happy to test any other solutions if it is difficult to reproduce the problem on another Linux Sytem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira