Hot answers tagged

5

Yes, storing your ssh keys directly on a build node is a bad practice. Nodes can be replicated, deleted, or given access to from other systems, and you don't want to lose track of what systems have access to your secrets. You should also not pass them directly into the build job, either as a parameter or as an environment variable. This can cause a huge ...


3

I think the answer should be yes to ecdsa but no to ed25519, but that it is currently no to both. You can externally generate an ecdsa keypair and load it into ssh/config/ca but vault-1.4.3 cannot sign using it. I haven't tried ed25519. Golang's ssh code (which vault uses) doesn't appear to know how to sign with ed25519 but should be able to sign with ecdsa. ...


3

A little more information is needed about specific operations you are doing, but generally your options are: For one-time operations: use kubectl exec to get into containers and do commands (works similar to docker exec). Also for one-time operations, spawn separate pods with shell access to interact with existing pods, something along the lines: kubectl ...


2

This error is due to invalid value of ansible_network_os: The playbook you try setup is meant for network devices. And since centos is not a network device OS the playbook will fail. Here you can find supported network OS. Ansible Documentation: ansible_network_os values If you don't have any device running a supported network OS I recommend you to follow ...


2

Try using GNU Screen or Tmux. These are called "screen multiplexers" but you'd get a number of benefits The commands you run will continue running even if you disconnect, or you have network related connection drops. Both software allow "re-attaching" to the running session Command outputs will persist in memory. You can start a long running command, log ...


2

You run the command with the user shishir9159_gmail_com but the error shows shishir9159@35.202.219.6: Permission denied ... seems like the _gmail_com portion of the username is truncated. Can you try setting the ansible_user config parameter in your inventory file or playbook rather than passing it on via the CLI?


1

There are pros and cons for both options: A single master key for your Ansible account would reduce complexity but you would need to ensure the private key is very secure, even if the key were password protected you would want to ensure the key is encrypted at rest with a tool like BlackBox and backed up somewhere. System unique SSH keys would help with ...


1

I would look at AWS System Manager to do this instead of direct ssh. Create a SSM document to run the commands you want to run, then this can be invoked by an AWS cli command from your CI/CD pipeline. We do something the same to update configuration files from an s3 bucket, run as part of a Gitlab pipeline.


1

Do the following for each Vagrant machine you want Ansible to work with...in this example, using the machine master1: Do vagrant ssh-config > vagrant-ssh Enter content from vagrant-ssh into your ~/.ssh/config, modifying it as needed, like this example for some machine named master1: Host master1 HostName 127.0.0.1 User vagrant Port 2222 ...


1

Not sure if complete reinstall is a valid option for you, but for me this helped: sudo minikube delete After delete is finished, minikube start again


1

As a little addition to such extensive answer, with docker ps you can --filter containers by label. One of the labels in swarm is a service name, so: docker ps --filter "label=com.docker.swarm.service.name=<service_name>" Should give you service containers on current node. To find more labels for possible filters hit docker ps --format &...


1

Answering my own question & accepting it because it works - this is the solution: Step 1: So I start by finding the Docker Service I recognise as my Drupal site "that's the site" node1 $ docker service ls As before, shown in the question, the output of that command is: ID NAME MODE REPLICAS ...


1

Create String parameter artifactID, Password parameter NexusUser with username and Password parameter NexusPassword with nexus password. curl -v -u $NexusUser:$NexusPassword -o ~/tmp_dl/distr.zip https://my_nexus_url.com/nexus/content/repositories/${artifactID}/distrib.zip


1

There are a few ways to do this, but by far the easiest is to put your credentials (either username/password or ssh keypair) into the Jenkins built-in credentials store and then use the sshagent step in your Pipeline script: sshagent(credentials: ['my-credentials']) { sh('scp mynexus.com/my_artifact.zip ~/my_artifact.zip') } You may need to install the ...


1

OK, there seems to be two problems here. SSH hanging after connection It's probably a problem on the client tty due to limitations of MinGW. In the past I've encountered that ssh was unable to ioctl the local tty because the lack of a control device (pty). I've used https://github.com/rprichard/winpty at the time, but I think that newer versions of MinGW/...


1

I recently made myself a small script that seems to do the work. It certainly can be done better but maybe you can get some inspiration: #!/bin/bash set -e if [ -z "$1" ] then echo "No host patter supplied. Please provide a host pattern that would match only one host form the inventory." echo "Usage: ansible-ssh <...


1

You could try ansinble-console It mostly feels like you just have a shell open, unless you use and ansible task name as your command, in which case prefixing it with shell <whatever you wanted to run> should work.


Only top voted, non community-wiki answers of a minimum length are eligible