<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>quick tips &#8211; OMG The Cloud!</title>
	<atom:link href="https://www.omgthecloud.com/tag/quick-tips/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.omgthecloud.com</link>
	<description>Video Tutorials for IT Professionals. Entertainment for the rest of us</description>
	<lastBuildDate>Wed, 19 Jan 2022 23:19:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.1</generator>

<image>
	<url>https://www.omgthecloud.com/wp-content/uploads/2021/04/cropped-OMG-logo-1-32x32.jpg</url>
	<title>quick tips &#8211; OMG The Cloud!</title>
	<link>https://www.omgthecloud.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Quickly push ssh keys to all your servers!</title>
		<link>https://www.omgthecloud.com/quickly-push-ssh-keys-to-all-your-servers/</link>
					<comments>https://www.omgthecloud.com/quickly-push-ssh-keys-to-all-your-servers/#comments</comments>
		
		<dc:creator><![CDATA[OMG!]]></dc:creator>
		<pubDate>Wed, 19 Jan 2022 20:57:43 +0000</pubDate>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[quick tips]]></category>
		<category><![CDATA[shorts]]></category>
		<guid isPermaLink="false">https://www.omgthecloud.com/?p=321</guid>

					<description><![CDATA[In this episode, I show you how to quickly and easily push your SSH public key out to a list of servers! This saves you a ton of time with repetitive logins, and is the preferred way to authenticate. Check out the video below, and come back for the example code&#46;&#46;&#46;]]></description>
										<content:encoded><![CDATA[
<p>In this episode, I show you how to quickly and easily push your SSH public key out to a list of servers! This saves you a ton of time with repetitive logins, and is the preferred way to authenticate. Check out the video below, and come back for the example code after the break!</p>



<figure class="wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio"><div class="wp-block-embed__wrapper">
<div class="epyt-video-wrapper"><div  id="_ytid_88081"  width="740" height="416"  data-origwidth="740" data-origheight="416" data-facadesrc="https://www.youtube.com/embed/ea1W-cgNTQ4?enablejsapi=1&#038;autoplay=0&#038;cc_load_policy=0&#038;cc_lang_pref=&#038;iv_load_policy=1&#038;loop=0&#038;modestbranding=1&#038;rel=0&#038;fs=1&#038;playsinline=0&#038;autohide=2&#038;theme=dark&#038;color=red&#038;controls=1&#038;" class="__youtube_prefs__ epyt-facade epyt-is-override  no-lazyload" data-epautoplay="1" ><img decoding="async" data-spai-excluded="true" class="epyt-facade-poster skip-lazy" loading="lazy"  alt="YouTube player"  src="https://i.ytimg.com/vi/ea1W-cgNTQ4/maxresdefault.jpg"  /><button class="epyt-facade-play" aria-label="Play"><svg data-no-lazy="1" height="100%" version="1.1" viewBox="0 0 68 48" width="100%"><path class="ytp-large-play-button-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"></path><path d="M 45,24 27,14 27,34" fill="#fff"></path></svg></button></div></div>
</div></figure>



<p>As you saw in the short video, you need two things: the script on your Mac or Linux machine&#8230;</p>



<pre class="wp-block-code"><code>#!/bin/bash
read -p 'Server username: ' uservar
read -sp 'Password: ' pwvar
for server in `cat list_of_servers`; do
    sshpass -p "${pwvar}" ssh-copy-id -i ~/.ssh/id_rsa.pub -o StrictHostKeyChecking=no "${uservar}@${server}"
done</code></pre>



<p>&#8230; and the input file. The file is just named &#8220;<strong>list_of_servers</strong>&#8221; (with no file extension) and has each server on a new row, like this:</p>



<pre class="wp-block-code"><code>server01
server02
anotherserver.mydomain.com
192.168.0.100</code></pre>



<p>Each server can be either a resolvable DNS name (<strong>server01</strong>), a fully-qualified name (<strong>anotherserver.mydomain.com</strong>) or just the IP address of the server will do as well (<strong>192.168.0.100</strong>)</p>



<p>Keep in mind, since this script is doing the key push in bulk, each server on this list needs to use the same username and password. It also does not do any harm to run the script a second or third time if you are just adding new servers to the list, it wont do anything bad.</p>



<p>Thanks for checking out this quick tip! Leave me a comment in the video description if you have questions, and as always I&#8217;ll see you in the next one!</p>



<p>~OMG</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.omgthecloud.com/quickly-push-ssh-keys-to-all-your-servers/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">321</post-id>	</item>
	</channel>
</rss>
