How to connect CircleCI to Jboss server without giving the password?

I have written automated deployment script with out giving password to connect circleci server to jboss server but it is recognized sshkey i have given sshkey in my repo and environment variable can you please help.

Looks like a duplicate of your other question.

Moreover, I’ve responded to a number of your other questions on this forum, and have not received a response. This question, and its duplicate, is too broad and difficult to answer. More details, such as code and configuration are required to make this answerable.

If I don’t receive a response to this, I’ll assume the account is a bot, and will ask moderators to consider disabling it.

in my previous question i didn’t see any suggestions can you please help me

See above! Please help me.

“This my config.yml file”

< deploy:

   enabled: true

working_directory: ~/CIDependency

  - checkout
  - add_ssh_keys:
          - "29:af:41:62:3c:f7:43:cc:15:cb:1d:53:f2:0a:da:9d"
  - run: chmod 700 .circleci/           
  - run:
      name: Dev Deployment 
      command: bash .circleci/


"Here i attached log "

Hi Sravankumar,

Thank you for providing your configuration. However, the second file is not formatted in this discussion forum, and it is rather hard to read. Would you carefully reformat the second file, so that it is readable and so that indentation is preserved?

I recall I sent you a private message some while back, to show how to correctly format code/config in Markdown. A few days later I received this:

@Sravankumar removed themselves from this message Apr 23


I wonder, if you are doing this for a commercial project, would it help to get assistance from a colleague or a local freelancer?

"And here am adding jboss script"
set -vx

echo "Deploy filename: "  $DEPLOY_FILE

if [ -z $DEPLOY_FILE ]
  echo "DEPLOY_FILE is empty"
  exit 1

scp -oStrictHostKeyChecking=no -i $ID_RSA -r ${DEPLOY_FILE} ${DEPLOY_USER}@${HOST_NAME}:/tmp/

echo "Return code: " $rc
if [ $rc -ne 0 ]; then
  echo "first scp command failed: $rc"
  exit $rc

Hi Halfer,

Reformatted second file and i was facing issue in days please help me for this issue how can we connect without giving password i added private key in ssh permission and in cirlceci environment variable i add my deployment server details like hostname,password,etc . And i was doing commercial project

Can any one suggest me how to connect with out password circlecci to jboss server?

I suggest you re-format your code file above, so it is readable, as I have requested many times. It will be like so:

# This script expects the $ID_RSA variable to contain a private key for the deploy user

You will need to click on the “edit” (pencil) icon to get to the editor.

I am not seeing much of a problem statement here (when you try what you are doing, we need to see what happens, like error messages etc). But, one step at a time.

Just now reformatted above code as well please check and help me

:cry: OK, close enough, despite the non-code at the start and end.

So, the next thing you need to work on is debugging. You want to connect to a Jboss server with a private key. Great! You have even provided some code that is, after a fashion, readable.

So, what problem are you having with this? The log indicates that scp tries to connect to the remote server, and asks for a password on the console, and fails because there is no console. So, it is either ignoring the private key or the key is failing.

You need to find out why that is. Try one of these with the rest of the command:

scp -v
scp -vv
scp -vvv

These will give you verbose information about what the command is doing. You can then copy and paste that log here in your question, again in a formatted block.

Good luck!

#!/bin/bash -eo pipefail
scp -o StrictHostKeyChecking=no -v medical-0.1.war sravan@
Executing: program /usr/bin/ssh host, user sreddy26, command scp -v -t /tmp/
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014

debug1: Reading configuration data /home/circleci/.ssh/config

debug1: Reading configuration data /etc/ssh/ssh_config

debug1: /etc/ssh/ssh_config line 1: Applying options for *

debug1: Connecting to [] port 22.

debug1: connect to address port 22: Connection timed out

ssh: connect to host port 22: Connection timed out

lost connection
Exited with code 1

I tried which you given command getting error sorry Halfer i corrected ip address my IP :

This will be my last reply.

The error message indicates that the server is unreachable, so that’s an entirely different error. You need to be able to contact the server you are deploying to.

Also, the last byte of your IP is 733, which is not possible. I suspect you have transcribed this wrongly in your post.

I mean this remark to be helpful: you need some one-to-one help/coaching. Using CI is hard, and it requires some familiarity with Linux, networking and trouble-shooting. I recommend that you approach someone locally, and bring them into your office, or get a good freelancer from TopTal or AirPair etc. Trying to get by with volunteer assistance is not going to cut it.

And when i ran this command in circleci cat ~/.ssh/ >> ~/.ssh/authorized_keys
am getting permission denied error.
#!/bin/bash -eo pipefail
cat ~/.ssh/ >> ~/.ssh/authorized_keys
/bin/bash: /home/circleci/.ssh/authorized_keys: Permission denied
Exited with code 1

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.