Linux Blog

No Password SSH Login

Filed under: Quick Linux Tutorials — TheLinuxBlog.com at 1:28 am on Monday, November 26, 2012

I SSH a lot. In the past I’ve pretty much always typed passwords to log on, but when trying to SSH in using my phone, with a good password it’s a pain to say the least. I had SSH Keys setup with password-less login before but usually ended up losing the thumb drive the key was on or updating my system and forgetting to update the key. We won’t discuss the security or best practice here, that’s for another post.

Anyhow I assume you’re reading this post because you want to set up a no password SSH logon by using keys for whatever reason, this post outlines how to do it. (You can also use a pass phrase if you feel so inclined.)

(Read on …)

Logging Sessions to Twitter

Filed under: Linux Software — TheLinuxBlog.com at 12:01 am on Wednesday, August 20, 2008

If you follow me on Twitter you would know I asked everyone if there was anything that they wanted me to write about. @Ben_Marvin responded and asked about logging the commands you type to Twitter.At first, I thought that this could be done with history, which it probably can be, but does everything you type really have to be echo’ed to Twitter? I don’t think that you’d have many friends, Twitter would probably hate you and you’d most likely hit your maximum requests per hour pretty quickly.The Script command is another option, and this works quite well for this purpose. Read the script man page to find out more about this program. It basically (when ran) takes the I/O from your terminal and logs it to a file. Its a very handy utility.So, how do we get this data into Twitter? First of all, Twitter doesn’t allow very long posts so echoing out the data that the commands you type is not really practical. The best way to do it is to use script to log the session, exit the session and grep for the “]0\;” string for stuff you typed & not the responses.Here is the code:

script; grep ]0\; typescript 

You can then copy and paste it to your favorite Twitter application or pipe it to a scrubbing script to remove the formatting and do the correct HTML stuff, then post it via the http interface. Either way, it can be done even though I don’t think it really should.