You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Victor Antonovich <vi...@mobileap.ru> on 2012/11/07 18:48:39 UTC

"admin:connect" command set password option

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I wonder, Apache Karaf 2.3.0 documentation [1] says that
`admin:connect` command supports password setting with "-p" option,
but actually it doesn't:

> karaf@root> admin:connect --help DESCRIPTION admin:connect
> 
> Connects to an existing container instance.
> 
> SYNTAX admin:connect [options] name [command]
> 
> ARGUMENTS name The name of the container instance command Optional 
> command to execute
> 
> OPTIONS --help Display this help message -u, --username Remote
> user name

Could you explain is this option support by `admin:connect` command
was dropped intentionally or not?

[1]
http://repo1.maven.org/maven2/org/apache/karaf/manual/2.3.0/manual-2.3.0.html

Thanks,
Victor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQmp73AAoJEM4WD7SRG0oPcA8IAMHwXsiF2COBmPDbJVmucUKS
PJgLyE7cR+gEahbx37Db+8aA5M8oyfDUf60xKMjd4lJHKmBMSHK3SwL3yptU0Lwd
pT5/BzrKH9bNm+5bPvOx1yic57A3EGE2hacRFZ54W5BiDJ1Uftr8r+1qw4h/WJlu
oW3yPXvQZEW/uR+cZd+PyVFp+p4OBC7mEswkNVrBpYT9bdGv7amn0Wfw5sbvQy8Z
kIBXmwHYjUtVjOtyYhkX9pNO9VB/hTaQQVAmTKNAV1KAeC2WcO0DzDbOhTozTUZ5
1JKlRvOmqwyI5FhdaUEsh0lMxpKE62msF/fjRqbXTLivyYU63p2Cl/mmPUPUTCI=
=tR5H
-----END PGP SIGNATURE-----

Re: "admin:connect" command set password option

Posted by sankar <ef...@softcom-int.com>.
Hello
but what if I need to connect to a karaf child instance instead?
commandSession.put("SSH_AUTH_SOCK", "local:karaf") corresponds to the local
shell.

Via JMX I can start/stop the karaf child instance but I cannot connect.

Thanks




--
View this message in context: http://karaf.922171.n3.nabble.com/admin-connect-command-set-password-option-tp4026712p4029600.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: "admin:connect" command set password option

Posted by Victor Antonovich <vi...@mobileap.ru>.
08.11.2012 13:07, Victor Antonovich wrote:

> Thanks for the response. I asked this question because I have some
> problem with using admin:connect command programmatically through
> org.apache.felix.service.command.CommandProcessor. Command execution
> just hangs with "Password:" output in log file. But same command
> manually entered in Karaf Shell works well without password prompting.
> Is this expected behaviour? What I should do to programmatically
> connect to instance using admin:connect command?

Found solution and it's simple. In case of executing admin:connect
command using CommandProcessor service, CommandSession SSH_AUTH_SOCK
property should be set, i.e. for user "karaf":

> CommandProcessor commandProcessor =
getOsgiService(CommandProcessor.class);
> CommandSession commandSession = commandProcessor.createSession(System.in,
                printStream, System.err);
> commandSession.put("SSH_AUTH_SOCK", "local:karaf");

Regards,
Victor.

Re: "admin:connect" command set password option

Posted by Victor Antonovich <vi...@mobileap.ru>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

07.11.2012 21:52, Jean-Baptiste Onofré wrote:
> Hi Victor,
> 
> In Karaf 2.3.x, we introduced the ssh-agent support, that allows
> you to connect without password (using certificate).
> 
> If the ssh agent is not "enable", admin:connect should prompt for
> the password.

Thanks for the response. I asked this question because I have some
problem with using admin:connect command programmatically through
org.apache.felix.service.command.CommandProcessor. Command execution
just hangs with "Password:" output in log file. But same command
manually entered in Karaf Shell works well without password prompting.
Is this expected behaviour? What I should do to programmatically
connect to instance using admin:connect command?

> I gonna update the documentation.
> 
> Thanks for reporting that.
> 
> Regards JB

Thanks,
Victor.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQEcBAEBAgAGBQJQm3ZZAAoJEM4WD7SRG0oP5ygH/i399l/Bk+fv+B6v+X/M5CX4
hLf6VMyej7b8bg1MLaUzv7dxbPLcAbjvjfH9TrIpWEr8vP5ARwl6La4hgD8P+9Xo
p4JltDLpZIC2s5itsGbiomaSFZDS4PJ0nq7A2txbtrJnYXrMaM+K8e6177U+CFIT
SOQ+XHdn3z0yOtH4WtStV+TV3MzrxblS0H5OQYUc2zlsasCkB30zgePjvbq2RxBF
n58wlmKSwdQD9VCSzrTDx0SUFz26KvsoXFM9cbmz2arZEAAbcrbHAkHHd3G8Z8kA
+PANPj3+Nfels2MhdHMwBAn74b63+QyhV3kKncjYiojwifvH6E6ncBjZaZmBb8Y=
=RkW/
-----END PGP SIGNATURE-----

Re: "admin:connect" command set password option

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Victor,

In Karaf 2.3.x, we introduced the ssh-agent support, that allows you to 
connect without password (using certificate).

If the ssh agent is not "enable", admin:connect should prompt for the 
password.

I gonna update the documentation.

Thanks for reporting that.

Regards
JB

On 11/07/2012 06:48 PM, Victor Antonovich wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello!
>
> I wonder, Apache Karaf 2.3.0 documentation [1] says that
> `admin:connect` command supports password setting with "-p" option,
> but actually it doesn't:
>
>> karaf@root> admin:connect --help DESCRIPTION admin:connect
>>
>> Connects to an existing container instance.
>>
>> SYNTAX admin:connect [options] name [command]
>>
>> ARGUMENTS name The name of the container instance command Optional
>> command to execute
>>
>> OPTIONS --help Display this help message -u, --username Remote
>> user name
>
> Could you explain is this option support by `admin:connect` command
> was dropped intentionally or not?
>
> [1]
> http://repo1.maven.org/maven2/org/apache/karaf/manual/2.3.0/manual-2.3.0.html
>
> Thanks,
> Victor.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJQmp73AAoJEM4WD7SRG0oPcA8IAMHwXsiF2COBmPDbJVmucUKS
> PJgLyE7cR+gEahbx37Db+8aA5M8oyfDUf60xKMjd4lJHKmBMSHK3SwL3yptU0Lwd
> pT5/BzrKH9bNm+5bPvOx1yic57A3EGE2hacRFZ54W5BiDJ1Uftr8r+1qw4h/WJlu
> oW3yPXvQZEW/uR+cZd+PyVFp+p4OBC7mEswkNVrBpYT9bdGv7amn0Wfw5sbvQy8Z
> kIBXmwHYjUtVjOtyYhkX9pNO9VB/hTaQQVAmTKNAV1KAeC2WcO0DzDbOhTozTUZ5
> 1JKlRvOmqwyI5FhdaUEsh0lMxpKE62msF/fjRqbXTLivyYU63p2Cl/mmPUPUTCI=
> =tR5H
> -----END PGP SIGNATURE-----
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com