<?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>server Archives - Beshoy Girgis</title>
	<atom:link href="https://beshoy.girgis.us/tag/server/feed/" rel="self" type="application/rss+xml" />
	<link>https://beshoy.girgis.us/tag/server/</link>
	<description>Father, husband, son, nerd.</description>
	<lastBuildDate>Sun, 12 Mar 2017 08:06:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>My First Bash-Completion Script</title>
		<link>https://beshoy.girgis.us/2012/11/my-first-bash-completion-script/</link>
					<comments>https://beshoy.girgis.us/2012/11/my-first-bash-completion-script/#respond</comments>
		
		<dc:creator><![CDATA[Beshoy Girgis]]></dc:creator>
		<pubDate>Tue, 20 Nov 2012 01:27:45 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[bash-completion]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[shell]]></category>
		<guid isPermaLink="false">http://beshoy.girgis.us/?p=224</guid>

					<description><![CDATA[By golly, I&#8217;ve finally done it!  I love bash completion and must have it on any shell-based device I own.  I&#8217;ve written countless numbers of scripts but for the most part, they&#8217;re fairly self-contained &#8212; with the exception of the &#8220;perms&#8221; script.  This script is nice and quick on a one-site box where I can <a class="read-more" href="https://beshoy.girgis.us/2012/11/my-first-bash-completion-script/">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>By golly, I&#8217;ve finally done it!  I love bash completion and must have it on any shell-based device I own.  I&#8217;ve written countless numbers of scripts but for the most part, they&#8217;re fairly self-contained &#8212; with the exception of the &#8220;perms&#8221; script.  This script is nice and quick on a one-site box where I can just run &#8220;perms&#8221; and my permissions for a set get reset to &#8220;production&#8221;.  I use this so that when doing WordPress updates for example, I can chmod -R 777 then run perms after all my updates &#8212; nice and quick! <img src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>Servers running multiple sites require a more complex perms script which accepts a $1 variable of the domain.  From there, I run the specific chowns and chmods and what not for that particular site using a case as well as some defaults that affect all the sites.</p>
<p>I&#8217;ve found it annoying to have to type &#8220;perms beshoy.girgis.us&#8221; or &#8220;perms odslabs.com&#8221; so I made a quick script to take care of the domain part for me.  This script gets dropped in <span style="font-family: Consolas, Monaco, monospace; font-size: 12px; line-height: 18px;">/etc/bash_completion.d/perms</span></p>
<pre class="brush: bash; gutter: true; first-line: 1"># bash completion for perms

_perms()
{
	  cur=${COMP_WORDS[COMP_CWORD]}
	  COMPREPLY=( $( compgen -W "$(ls /vhosts/)" -- $cur ) )
}
complete -o default -o nospace -F _perms perms</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://beshoy.girgis.us/2012/11/my-first-bash-completion-script/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux: SSH Strong Public/Private Key Using ssh-keygen</title>
		<link>https://beshoy.girgis.us/2012/09/linux-ssh-strong-publicprivate-key-using-ssh-keygen/</link>
					<comments>https://beshoy.girgis.us/2012/09/linux-ssh-strong-publicprivate-key-using-ssh-keygen/#respond</comments>
		
		<dc:creator><![CDATA[Beshoy Girgis]]></dc:creator>
		<pubDate>Fri, 28 Sep 2012 02:09:22 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<guid isPermaLink="false">http://beshoy.girgis.us/?p=187</guid>

					<description><![CDATA[I&#8217;ve come to love encryption. My Linux boxes all do not allow password-authentication for SSL and instead use public authentication. I don&#8217;t use a standard 1024 or 2048 bit key, I use&#8230; a&#8230; 16384 bit key.. yeah.. that crazy dude&#8217;s the highest ssh-keygen will allow :). If you decide to be as crazy as I <a class="read-more" href="https://beshoy.girgis.us/2012/09/linux-ssh-strong-publicprivate-key-using-ssh-keygen/">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve come to love encryption.  My Linux boxes all do not allow password-authentication for SSL and instead use public authentication.  I don&#8217;t use a standard 1024 or 2048 bit key, I use&#8230; a&#8230; 16384 bit key.. yeah.. that crazy dude&#8217;s the highest ssh-keygen will allow :).  If you decide to be as crazy as I am, be sure to give your computer at least 10 solid minutes to generate the private/public pair.  Having to do this on micro Amazon instances takes a while and I find that my ssh session times out before it finishes or I walk away and don&#8217;t get back until my session gets timed out.. or&#8230;. I forget it&#8217;s running and put my computer to sleep.  The solution I&#8217;ve come up with is to just tell Linux to do it all in the background.  I can run the following command as the user needing the key and exit the session immediately after:</p>
<pre lang="bash">ssh-keygen -t rsa -b 16384 -N "" -f ~/.ssh/id_rsa &</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://beshoy.girgis.us/2012/09/linux-ssh-strong-publicprivate-key-using-ssh-keygen/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Sendmail Failing to Send to Local Domain</title>
		<link>https://beshoy.girgis.us/2012/09/sendmail-failing-to-send-to-local-domain/</link>
					<comments>https://beshoy.girgis.us/2012/09/sendmail-failing-to-send-to-local-domain/#comments</comments>
		
		<dc:creator><![CDATA[Beshoy Girgis]]></dc:creator>
		<pubDate>Wed, 19 Sep 2012 21:14:34 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nerdy]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[server]]></category>
		<guid isPermaLink="false">https://beshoy.girgis.us/?p=182</guid>

					<description><![CDATA[I&#8217;ve run into this issue a couple of times now so I&#8217;m assuming others are as well.  Servers set up on Amazon EC2 with default sendmail configuration seem to get the following error in their /var/log/maillog: 12 Sep 19 19:48:26 DOMAIN sendmail[31192]: q8JJmQQV031192: ... User unknown 13 Sep 19 19:48:26 DOMAIN sendmail[31191]: q8JJmQ0D031191: to=orders@DOMAIN.com, ctladdr=DOMAIN.com <a class="read-more" href="https://beshoy.girgis.us/2012/09/sendmail-failing-to-send-to-local-domain/">[&#8230;]</a>]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve run into this issue a couple of times now so I&#8217;m assuming others are as well.  Servers set up on Amazon EC2 with default sendmail configuration seem to get the following error in their /var/log/maillog:</p>
<pre class="brush: shell; gutter: true; first-line: 1">12 Sep 19 19:48:26 DOMAIN sendmail[31192]: q8JJmQQV031192: ... User unknown
13 Sep 19 19:48:26 DOMAIN sendmail[31191]: q8JJmQ0D031191: to=orders@DOMAIN.com, ctladdr=DOMAIN.com (504/502), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30695, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknow
14 Sep 19 19:48:26 DOMAIN sendmail[31192]: q8JJmQQV031192: from=, size=695, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
15 Sep 19 19:48:26 DOMAIN sendmail[31191]: q8JJmQ0D031191: q8JJmQ0E031191: DSN: User unknown
16 Sep 19 19:48:26 DOMAIN sendmail[31192]: q8JJmQQX031192: from=&lt;&gt;, size=2616, class=0, nrcpts=1, msgid=, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
17 Sep 19 19:48:26 DOMAIN sendmail[31191]: q8JJmQ0E031191: to=DOMAIN.com, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31719, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (q8JJmQQX031192 Message accepted for delivery)
20 Sep 19 19:48:26 DOMAIN sendmail[31193]: q8JJmQQX031192: to=, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32817, dsn=2.0.0, stat=Sent
21 Sep 19 19:49:36 DOMAIN sendmail[31200]: q8JJnaxi031200: from=DOMAIN.com, size=698, class=0, nrcpts=1, msgid=, relay=DOMAIN.com@localhost</pre>
<p>The solution that I have found to work is to modify /etc/mail/sendmail.mc and add the following to the very end:</p>
<pre class="brush: bash; gutter: true; first-line: 1">define(`MAIL_HUB', `DOMAIN.com.')dnl
define(`LOCAL_RELAY', `DOMAIN.com.')dnl</pre>
<p><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;">Be sure to replace DOMAIN with your local domain.</span></p>
<p><strong>Notice: </strong>The above define code entries start with a ` and end with a &#8216;.  Make sure you copy+paste the above as it is, and modify the domain as it&#8217;s not the standard begin with a ` and end with a `.</p>
<p>After doing so, you&#8217;ll need to install sendmail-cf and run a reconfiguration with the following:</p>
<pre class="brush: bash; gutter: true; first-line: 1">cd /etc/mail/
yum install sendmail-cf
/etc/mail/make</pre>
<p>Lastly, restart sendmail:</p>
<pre class="brush: bash; gutter: true; first-line: 1">service sendmail restart</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://beshoy.girgis.us/2012/09/sendmail-failing-to-send-to-local-domain/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Object Caching 8/106 objects using disk
Page Caching using disk: enhanced 
Lazy Loading (feed)
Minified using disk
Database Caching using disk (Request-wide modification query)

Served from: beshoy.girgis.us @ 2026-06-12 02:48:37 by W3 Total Cache
-->