Ubuntu Installation Salt-ssh

Source: Internet
Author: User

Introduced:

Salt-ssh is a new feature of 0.17.0, the name will know that it is dependent on SSH for remote command execution tools, the advantage is that you do not need to install Minion on the client, do not need to install master (directly installed SALT-SSH this package), a bit like Paramiko, PSSH, ansible such tools, sometimes you really need salt-ssh (for example: conditions do not allow the installation of Minion, not long-term management of a minion) the most important thing is salt-ssh is not just a simple SSH tool, it supports Salt most of the functions, such as grains, modules, state, etc.

Note that SALT-SSH does not inherit the original communication architecture (ZeroMQ), which means that it will be slower to execute.


Installing SALT-SSH

[Email protected]:~# apt-get Install salt-ssh-y

SALT-SSH is implemented by invoking the Roster configuration file, with a simple syntax that defines ID, host, user, password

[email protected]:/etc/salt# pwd/etc/salt[email protected]:/etc/salt# lsmaster   Master.bak  master.d  pki  roster[email protected]:/etc/salt# cat  roster # sample salt-ssh config file#web1:#  host: 192.168.42.1  # The IP addr or DNS hostname#  user: fred          # Remote executions will be executed  As user fred#  passwd: foobarbaz  # the password to use  for login, if omitted, keys are used#  sudo: True          # whether to sudo to root, not  enabled by default#web2:#  host: 192.168.42.2node1:   host:  192.168.1.10  &nbSp;user: root   passwd: xxxooo 

Format:

<salt id>: # ID, for salt-ssh reference host: # IP or domain name User: # login username passwd: # login Password # optional parameter port: # Custom Port sudo: # whether to allow sudo to root, default does not allow Priv: # SSH Login key path, default is salt-ssh.rsatimeout: # wait Timeout

Do salt-ssh prompt need to enter Y, so many to enter Y, always can not be entered manually.

[Email protected]:~# salt-ssh ' node1 '-R ' pwd '


Workaround:

[Email protected]:~# touch/root/.ssh/config [email protected]:~# cat/root/.ssh/config host 121.42.137.107 Stricthostke Ychecking No

Use Salt-ssh again

[email protected]:~# salt-ssh  ' Node1 '  -r  ' free -m ' node1:                  total        used       free     shared     buffers     cached    Mem:           7983        767        7215          0          23        575     -/+ buffers/cache:        168        7815    Swap:             0          0           0


Installing Salt-minion with Salt-ssh

[Email protected]:~# salt-ssh ' node1 '-R ' apt-get install salt-minion-y ' node1:reading package lists ...    Building Dependency Tree ...    Reading state information ... salt-minion is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 158 not upgraded


This article is from the "Village Boys" blog, please make sure to keep this source http://noodle.blog.51cto.com/2925423/1744605

Ubuntu Installation Salt-ssh

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.