Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

ansible ssh on different port

[linux-servers]
xcpng5.homelab.com ansible_port=3511
xcpng2.homelab.com ansible_port=3522
xcpng1.homelab.com ansible_port=3523
Comment

ansible ssh on different port

#The only thing I can think of that might work would be to create ssh aliases for your hosts. In your .ssh/config:

Host de.1.before
  HostName 192.26.32.32
  Port 22

Host de.1.after
  HostName 192.26.32.32
  Port 8888

#Then use these aliases in your Ansible inventory:

[de-servers-before]
de.1.before

[de-servers-after]
de.1.after
Comment

ansible ssh on different port

# Easy way, edit /etc/ansible/hosts:

[my_server]
ssdnodes:54321
and you can test it by issuing a ping:

ansible ssdnodes -m ping

#and the response would be:

ssdnodes | SUCCESS => {
    "changed": false,
    "ping": "pong"
}
Comment

PREVIOUS NEXT
Code Example
Shell :: change or set password interactively in linux 
Shell :: patch a file in vendor 
Shell :: docker-compose-to-always-re-create-containers-from-fresh-images 
Shell :: GIT: Clone and Existing Repository 
Shell :: how to run back and front simultaneously linux 
Shell :: create aws ec2 launch template 
Shell :: backup pihole settings 
Shell :: git debug 
Shell :: install docpars 
Shell :: how to install jupyter notebook in lenovo chromebook duet 
Shell :: ignore pre-commit hook 
Shell :: screen record on fedora 
Shell :: view symbols of so linux 
Shell :: disban camera ubuntu 
Shell :: how to send data to pushgateway from a shell script 
Shell :: dockerd failed to start daemon: failed to get temp dir to generate runtime scripts 
Shell :: solr cloud cluster setup 
Shell :: oracle vm cannot install guest edition windows 10 enterprise 
Shell :: cancel jobs related to one name 
Shell :: status code 409 sudo has snap-install 
Shell :: butler push userversion 
Shell :: install graphene federation 
Shell :: how to compress all branches on branch into one branch back to the master 
Shell :: linux terminal clear shortcut 
Shell :: How to import or export dependencies into env yml conda 
Shell :: git collab 1 
Shell :: is there a infinitey infinitey 
Shell :: command to push code to github 
Shell :: grep print next line after match 
Shell :: delete all git ignored files 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =