<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7271455915656646840</id><updated>2011-04-21T15:56:05.801-07:00</updated><category term='mirror'/><category term='ssh'/><category term='Shortcuts'/><category term='CLI'/><category term='SSL'/><category term='cp'/><category term='rsync'/><category term='Linux'/><category term='mv'/><title type='text'>My Long List of Linux Commands</title><subtitle type='html'>Another pretty much useless blog developed mainly out of my own short coming of not being able to remember cool *nix commands when I need them.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ml3c.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ml3c.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>eSolves</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_QIrnvVkBm44/R2F9fGQq-hI/AAAAAAAABMk/PZaztEpB7pY/S220/2037291480_4207105d90.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7271455915656646840.post-4917295020855905657</id><published>2008-06-12T22:47:00.001-07:00</published><updated>2008-06-12T22:51:54.541-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SSL'/><category scheme='http://www.blogger.com/atom/ns#' term='CLI'/><title type='text'>Creating Apache Certificates</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;OK I spent the weekend doing something I haven't done in awhile and man was I rusty. I had to enable HTTPS on an Apache server, create a CSR, and install a certificate. I wanted to walk you through the commands I used to generate the CSR and install the certificate. As a bonuse I will also show you how to generate a self-signed certificate. This was done using &lt;a href='http://www.openssl.org/'&gt;OpenSSL&lt;/a&gt; on a &lt;a href='http://www.debian.org/'&gt;Debian&lt;/a&gt; system. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step One - Create a server key&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face='agency'&gt;openssl genrsa -des3 -out server.key 4096&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;This command will generate a file called server.key. It will prompt you for a password. Typically you don't really want a password, I will explain this more later, but you don't really have a chose you have to enter one just make sure you remember what you enter. We'll address this more after the next couple of steps&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step Two - Create a Certificate Server Request (CSR)&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;font face='agency'&gt;openssl req -new -key server.key -out server.csr&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;This is what you are going to provide your Certificate provider to generate your actual certificate. You will be prompted for your password again. Then you are prompted with a bunch of follow up question, the one you want to really pay attention to and make sure you get right is the "Common Name". This is the URL you are trying to get a certificate for so make sure you get it right. Don't put in http:// or https:// just the URL (example www.mydomain.com). Near the end you will be prompted for a "Challenge Password", this does not have to be the same as the password you provided for your server.key file. You will need to remember this challenge password because you will be prompted for it again when you go to install the certificate. I believe you can actually leave this one blank but I wouldn't. &lt;br/&gt;&lt;br/&gt;&lt;b&gt;Step Two.One - Generate a Self Sign Certificate &lt;/b&gt;&lt;br/&gt;&lt;br/&gt;At this point you have a CSR file to send into a Certificate Provider and get a real certificate generated for you. However, these certificates are not cheap and if this is not a production environment or if its just a administrative area, you might be happier with the much cheaper alternative of a "Self Signed Certificate". This is a certificate you generate yourself. Now since it's not a certificate from a recognized certificate provider, you will be prompted if you do actually want to accept this certificate. So why would you do this, well as I mentioned its cheaper and the end result is that it still encrypts you traffic. So let's generate a self sign certificate, if you are going the way of getting a certificate from a provider you can skip this step. &lt;br/&gt;&lt;font face='agency'&gt;&lt;br/&gt;&lt;br/&gt;openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt&lt;/font&gt;&lt;br/&gt;&lt;b&gt;&lt;br/&gt;Step Three - Remove Password From Server.key File&lt;/b&gt;&lt;br/&gt;&lt;br/&gt;By this step, you should have a actual certificate file either by self generating or purchasing, problem is if you install everything as is, you will be prompted for the password you provided when you generated the server.key file every time you  go to start up your web server.  You can imagine how this could be a annoying. If you are OK with entering your password every time the Apache service starts (including reboots), then you can skip this step. If not, then we are going to remove the password from the server.key file. &lt;br/&gt;&lt;br/&gt;Generate a non-password version of the server.key file &lt;br/&gt;&lt;br/&gt;&lt;font face='agency'&gt;openssl rsa -in server.key -out server.key.insecure&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;It's a good idea to keep the original server.key file that has the password so lets rename that file&lt;br/&gt;&lt;font face='agency'&gt;&lt;br/&gt;mv server.key server.key.secure&lt;br/&gt;&lt;/font&gt;&lt;br/&gt;And now we'll make our insecure version the main file &lt;br/&gt;&lt;font face='agency'&gt;&lt;br/&gt;mv server.key.insecure server.key&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;b&gt;Move the Files&lt;/b&gt; &lt;br/&gt;&lt;br/&gt;That should be pretty much it now all you need to do is move your files to the correct locations&lt;br/&gt;&lt;br/&gt;&lt;font face='agency'&gt;mv server.key /etc/ssl/private/&lt;br/&gt;mv server.crt /etc/ssl/certs/&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Now, you just need to enable the site as HTTPS in Apache. If you are not sure how to do this, I will post that in the next couple of days as well. &lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7271455915656646840-4917295020855905657?l=ml3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ml3c.blogspot.com/feeds/4917295020855905657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7271455915656646840&amp;postID=4917295020855905657' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/4917295020855905657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/4917295020855905657'/><link rel='alternate' type='text/html' href='http://ml3c.blogspot.com/2008/06/creating-apache-certificates.html' title='Creating Apache Certificates'/><author><name>eSolves</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_QIrnvVkBm44/R2F9fGQq-hI/AAAAAAAABMk/PZaztEpB7pY/S220/2037291480_4207105d90.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7271455915656646840.post-6739409500355759645</id><published>2008-06-08T00:22:00.001-07:00</published><updated>2008-06-08T00:22:38.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ssh'/><category scheme='http://www.blogger.com/atom/ns#' term='mirror'/><category scheme='http://www.blogger.com/atom/ns#' term='rsync'/><category scheme='http://www.blogger.com/atom/ns#' term='CLI'/><title type='text'>rsync Over ssh</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;I love the rsync command. A great tool for grabbing a copy of files you need from one location. If the server is remote, you probably want to make sure you are transferring these files securely. For this we are going to use rsync in conjunction with ssh. &lt;font face='arial'&gt;&lt;i&gt;One thing to note, in order to do this you will need to set up ssh between the two servers to use keys. &lt;/i&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;Here is a simple rsync+ssh example:&lt;br/&gt;&lt;br id='izzl18'/&gt; rsync -ave ssh username@www.remoteserver.com:/location/on/remote/server/ /location/on/local/machine/&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;Here is how the command breaks down:&lt;br/&gt;&lt;br/&gt;&lt;b&gt;&lt;font color='#660000'&gt;rsync&lt;/font&gt;&lt;/b&gt; (Start of the command) &lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;-a &lt;/font&gt;&lt;/b&gt;&lt;font color='#660000'&gt;&lt;font color='#000000'&gt;(archive mode)&lt;br/&gt; &lt;font color='#660000'&gt;&lt;b&gt;v&lt;/b&gt;&lt;/font&gt; (verbose, will show you what is being copied as it is being copied)&lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;e&lt;/font&gt;&lt;/b&gt; &lt;/font&gt;&lt;/font&gt;(specify the remote shell to use)&lt;br/&gt;&lt;b&gt;&lt;font color='#660000'&gt; ssh&lt;/font&gt;&lt;/b&gt; (how to connect to remote server)&lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;username&lt;/font&gt;&lt;/b&gt; (username to connect as)&lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;@www.remoteserver.com&lt;/font&gt;&lt;/b&gt; (remote server to connect to)&lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;:/location/on/remote/server/&lt;/font&gt;&lt;/b&gt; (location on remote machine of file(s) you want to copy)&lt;br/&gt; &lt;b&gt;&lt;font color='#660000'&gt;/location/on/local/machine/&lt;/font&gt;&lt;/b&gt; (location of location machine where you want to copy the files to)&lt;br/&gt;&lt;br /&gt; &lt;br/&gt;&lt;font color='#660000'&gt;&lt;font color='#000000'&gt; A lot more can be done using rsync. For more ideas please run 'man rsync' on you local Linux box. &lt;br/&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7271455915656646840-6739409500355759645?l=ml3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ml3c.blogspot.com/feeds/6739409500355759645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7271455915656646840&amp;postID=6739409500355759645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/6739409500355759645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/6739409500355759645'/><link rel='alternate' type='text/html' href='http://ml3c.blogspot.com/2008/06/rsync-over-ssh.html' title='rsync Over ssh'/><author><name>eSolves</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_QIrnvVkBm44/R2F9fGQq-hI/AAAAAAAABMk/PZaztEpB7pY/S220/2037291480_4207105d90.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7271455915656646840.post-6222290893101569030</id><published>2007-05-18T16:44:00.001-07:00</published><updated>2008-06-08T00:03:22.228-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mv'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Shortcuts'/><category scheme='http://www.blogger.com/atom/ns#' term='cp'/><category scheme='http://www.blogger.com/atom/ns#' term='CLI'/><title type='text'>mv (and cp) Shortcut</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;Shortcut command for move and copy. The format is simple. You simply add  an {,.addname} to the end of the filename you are trying to mv or cp.&lt;br/&gt;&lt;br/&gt;example:&lt;br/&gt;$ mv filename{,.backup}&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7271455915656646840-6222290893101569030?l=ml3c.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ml3c.blogspot.com/feeds/6222290893101569030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7271455915656646840&amp;postID=6222290893101569030' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/6222290893101569030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7271455915656646840/posts/default/6222290893101569030'/><link rel='alternate' type='text/html' href='http://ml3c.blogspot.com/2007/05/command-line.html' title='mv (and cp) Shortcut'/><author><name>eSolves</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp1.blogger.com/_QIrnvVkBm44/R2F9fGQq-hI/AAAAAAAABMk/PZaztEpB7pY/S220/2037291480_4207105d90.jpg'/></author><thr:total>0</thr:total></entry></feed>
