Kickstart SSH usage – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, terminal, kickstart, , .
I have a small Kickstart script which (among other things) connects to our Puppet master, approves the certificate request and then creates a basic framework for a new server.
Within my Kickstart post section I have the following commands.
# Run the setup script. exec < /dev/tty6 > /dev/tty6 2>&1 chvt 6 wget http://enoch/ks/setup.sh -O /root/setup.sh chmod +x /root/setup.sh bash /root/setup.sh # And go back to Anaconda chvt 1 exec < /dev/tty1 > /dev/tty1 2>&1
Within setup.sh I have the line
ssh -t $USERNAME@puppetmaster auto_client.sh $HOSTNAME
This works perfectly when called from the command line, however when I run this from the Kickstart menu my SSH window opens under the original terminal and breaks the remainder of the script. How can I correct this?
While not a solution to the underlying behavior I worked around this problem by changing the virtual terminal back to 1 for the SSH binary as shown below.
echo Running server side script.. chvt 1 ssh -q -t $USERNAME@puppetmaster auto_client.sh $HOSTNAME chvt 6