I got a bit confused which mailing list to choose while posting this
thread. Now I understand the difference. Thank you for the clarification.

Regards,
Parichay (baymac)




On Mon, Mar 25, 2019 at 4:51 AM Mark Waite <[email protected]>
wrote:

> This is really a question for the Jenkins users list, not for the
> developers list.  The developers list is used for discussions related to
> developing capabilities for Jenkins, not for those using Jenkins to do
> their own development.
>
> In your specific case, the docker run command needs to have a command line
> argument that will allow ssh traffic through to the Jenkins port that is
> listening for ssh.  Just as it has a port 8080 command line argument, it
> needs another argument that will allow ssh traffic to reach Jenkins.
>
> Mark Waite
>
> On Sat, Mar 23, 2019 at 7:37 PM Parichay Barpanda <
> [email protected]> wrote:
>
>> Hi all,
>>
>> I am trying to use Jenkins Remote CLI to configure my Jenkins server
>> remotely. I am running a jenkinsci/blueocean docker container.
>>
>> To enabled SSHD on my jenkins server:
>> 1) At http://localhost:8080/configureSecurity/ : Enabled SSHD Port ->
>> Random
>> 2) AT http://localhost:8080/user/baymac/configure: Added my Public key
>> of local machine
>>
>> Trying ssh from bash:
>> ssh -l baymac -p 46653 localhost who-am-i
>>
>> Error message:
>> ssh: connect to host localhost port 46653: Connection refused
>>
>> Trying to use Jenkins CLI client to ssh into Jenkins server with the
>> following command:
>>
>> java -jar jenkins-cli.jar -s http://localhost:8080 -i ~/.ssh/id_rsa -ssh
>> -user baymac who-am-i
>>
>> I receive an error message:
>> Enter passphrase for /home/parichay/.ssh/id_rsa:
>> Mar 24, 2019 6:38:56 AM
>> org.apache.sshd.client.config.hosts.ConfigFileHostEntryResolver
>> reloadHostConfigEntries
>> INFO: resolveEffectiveResolver(baymac@localhost:46653) loaded 1 entries
>> from /home/parichay/.ssh/config
>> org.apache.sshd.common.RuntimeSshException: Failed to get the session.
>> at
>> org.apache.sshd.client.future.DefaultConnectFuture.getSession(DefaultConnectFuture.java:59)
>> at hudson.cli.SSHCLI.sshConnection(SSHCLI.java:104)
>> at hudson.cli.CLI._main(CLI.java:608)
>> at hudson.cli.CLI.main(CLI.java:427)
>> Caused by: java.net.ConnectException: Connection refused
>> at sun.nio.ch.UnixAsynchronousSocketChannelImpl.checkConnect(Native
>> Method)
>> at
>> sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishConnect(UnixAsynchronousSocketChannelImpl.java:252)
>> at
>> sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:198)
>> at
>> sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213)
>> at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293)
>> at java.lang.Thread.run(Thread.java:748)
>>
>> I enter the right passphrase, since I tried to ssh into another device it
>> is working.
>>
>> Extra information:
>>
>> I run the docker with the following command:
>>
>> sudo docker run \
>>
>>   --rm \
>>
>>   -u root \
>>
>>   -p 8080:8080 \
>>
>>   -v jenkins-data:/var/jenkins_home \
>>
>>   -v /var/run/docker.sock:/var/run/docker.sock \
>>
>>   -v "$HOME":/home \
>>
>>   --name jenkins \
>>
>>   Jenkinsci/blueocean
>>
>> HTTP auth works:
>>
>> java -jar jenkins-cli.jar -s http://localhost:8080/ -auth baymac:<api_token> 
>> who-am-i
>>
>>
>> Message:
>>
>> Authenticated as: baymac
>> Authorities:
>>   authenticated
>>
>>
>> I am unable to debug this, a pointer to this error would be really
>> helpful.
>>
>> Regards,
>> Parichay (baymac)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-dev/53f15502-cf94-4a51-9202-7f0080e45c05%40googlegroups.com
>> <https://groups.google.com/d/msgid/jenkinsci-dev/53f15502-cf94-4a51-9202-7f0080e45c05%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Thanks!
> Mark Waite
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtHfdArBEKQDQ4russkxzfqHtzMSCudHgaFPXx84x%3DXFHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtHfdArBEKQDQ4russkxzfqHtzMSCudHgaFPXx84x%3DXFHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAD0DWAOY8jNgf5gyOFs-_3SC4Py-8%3D25ivbkpi61e%3D%3DjGaG%3DBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to