Questions tagged [ssh]

Use this tag if a question is about ssh

30 questions
8
votes
3 answers

Using SSH to open interactive session in ansible

Is there a semi-easy way to use Ansible to open an interactive session? I've spent a good amount of time making use of keys and other credentials stores to make a stellar ansible inventory file. Problem is, when I want to get on the servers that I…
Peter Turner
  • 1,482
  • 4
  • 18
  • 39
5
votes
1 answer

Ansible no user $HOME by default - so how do I run commands

I have thousands of servers that, by default, for security and space do not create a $HOME when you ssh in. This seems to be posing a problem for Ansible as it keeps trying to chdir to home that does not exist. Can I get Ansible to use another…
eekfonky
  • 151
  • 1
  • 4
4
votes
2 answers

Cloud-Init Script Won't Run?

I am working through this Terraform tutorial, which boots up a Go web app on an EC2 instance, using Terraform and cloud-init. This is my Terraform config file: terraform { required_version = ">= 0.13" required_providers { aws = { …
4
votes
1 answer

How to run a single one-time command on a kubernetes instance/pod

Currently I have a setup on AWS with 4 EC2 machines. They provide a web interface that among other things also has a database search. My recent project was to move the database search to AWS Elastic Search. That took a while but in the end it was…
ChatterOne
  • 143
  • 1
  • 1
  • 4
2
votes
2 answers

How to SSH from Jenkins node to Jenkins node safely?

We have a Jenkins Job that builds something on node A and then needs to SCP it to node B. You can just put the SSH keys for node B on Node A, and SCP with an execute shell build step, however I suspect that keeping SSH keys on a Jenkins node is a…
Uberhumus
  • 297
  • 4
  • 15
2
votes
0 answers

Jenkins build fails when no commits in the code (ChannelSftp.throwStatusError)

I have built a jenkins pipeline for executing a test on a windows server. Once the automated test report is generated on the windows server, it ships that report to a different server. There are methods for that automation framework (that code I…
2
votes
1 answer

Terraform: Why is null_resource's remote-exec not connecting to aws_instance via SSH?

I've been going through answers to similar questions on this StackExchange and on StackOverflow and reading through documentations all day ... Here's the .tf file I'm executing: # defines the AWS provider provider "aws" { # credentials path:…
Omar Shazly
  • 85
  • 1
  • 6
2
votes
2 answers

Git keeps asking for ssh passphrase when SSH is already defined in GitLab

I'm playing around with a personal GitLab account to get familiar with its' ins and outs. First, I followed this primer on setting ssh keys and added public and private ED25519 keys to ~\.ssh. I added the public key to my GitLab account. Then, using…
user32882
  • 121
  • 1
  • 4
2
votes
1 answer

Vault `SSH-CA` Elliptic Curve rather than `RSA`

Is it possible to use ECDSA(Elliptic Curve Digital Signature Algorithm) or EdDSA( Edwards-curve Digital Signature Algorithm) instead of RSA when configuring SSH-CA on HashiCorp Vault?
Woodstock
  • 123
  • 6
2
votes
2 answers

Download an artifact from Nexus to Jenkins

I use ssh username and private key auth to download sources from Git, build the artifact and deploy it to my nginx server. Now I need to download an artifact as a zip file to Jenkins agent, prepare it and deploy to my nginx server. I can only access…
Stepan
  • 131
  • 1
  • 1
  • 4
1
vote
2 answers

Automatically write new bash history to change-log file

Every time I ssh into a server I might issue some bash commands and then sign off (hup signal?). Is there a way to write the shell commands that I issued on the server to some changelog file? I want to remove basic commands like ls/cd, and duplicate…
Alexander Mills
  • 395
  • 1
  • 3
  • 11
1
vote
1 answer

Are Bitbucket branches pipelines running before or after the commit to that branch?

I am adding a production deployment pipeline to a Bitbucket project. The YAML file is roughly image: php:8.2.20 pipelines: branches: master: - step: name: Deploying to production deployment: production …
1
vote
2 answers

Ansible Connecting to remote Docker container over SSH

I have the following situation: I have a remote server that runs docker with a Postgres container. The Postgres instance is only reachable through a docker network, not directly from the remote server. I am trying to create an ansible role that…
Tiim
  • 21
  • 4
1
vote
1 answer

ansible_become has no effect despite the ability to execute sudo on GCP hosts

Say I want to execute the following command on target hosts (deployed on GCP): ansible all -a "head -1 /etc/shadow". The command demands the root access. With the default Ansible configuration, I get the following error: host1 | FAILED | rc=1…
1
vote
2 answers

Is there a way to exclusively manage multiple ssh keys with differing per-key options using ansible?

Ansible provides a ansible.builtin.authorized_key module which provides a lot of functionality: You can set exclusive: true to delete all other keys. You can set key_options: .... You can list multiple keys in key by separating them with new…
Helmut Grohne
  • 165
  • 1
  • 7
1
2