Posts Tagged linux
Automate SSH Logins with expect (without keys)
Posted by James B. in Technology on February 8, 2010
You need to automate a task across many machines. You know the user name and password, but for some reason, either by policy or otherwise, you are not allowed to use PKI, or Public Key Infrastructure.
Well, not to give up hope just yet, because there is a nice little tool that is extremely powerful, yet not widely utilized. it’s called ‘expect’.
Read the rest of this entry »
Introducing TermBuilder – a Linux command line generator
Posted by James B. in Technology on February 1, 2010
If you’re a Linux newbie who wants to learn a bit more about the command line, or if you want to chain a few commands together to get some special output, we have a new tool for you to try. It is called TermBuilder, and it’s a web-based command-line generator for Linux and other compatible Unixes. All you have to do is click buttons and choose options and it will generate commands for you to copy and paste into your terminal.
Now, this is just the first release of TermBuilder, and that means you should expect some bugs. Plus, it only supports a handful of commands right now – if there are things you’d like to see it do, post a comment on the TermBuilder page and we’ll see what we can do. In the meantime, give it a try and let us know what you think!
Lenovo W500 – Ubuntu Installation
Posted by James B. in Technology on August 22, 2009
So I got a new laptop and, of course, I am going to be installing Ubuntu on it. This time I am going to be dual-booting my machine with Windows XP and Ubuntu 9.04. I will post what works and what doesn’t. I normally have pretty good luck with my laptop installations. Wish me luck!
mysql-proxy
Posted by James B. in Technology on July 27, 2009
So I am entertaining the idea of using mysql-proxy for load-balancing a mysql cluster here at work. Not quite sure if it is ready but wouldn’t be bad to test it out. I am going to setup a test scenario for this and see where this takes me. Post more details when they are availabe.
screen Tricks
Posted by James B. in Technology on July 15, 2009
screen is a very useful program which in effect gives you multiple console screens in the same window. It’s handy if you’re using a console rather than an xterm, or if you’re connected to another machine, as it means you can do multiple things at once without having to move to another console or open another ssh connection. Even more useful if you’re working remotely: If your connection falls over while you’re still in a screen session, you can ssh back to the machine and reattach the screen (with screen -r) and get straight back to where you were, rather than having to start over.
You can also manually detach the screen, with screen -d (detach screen), or by hitting Ctrl-A then D while in a screen session. This leaves the screen running in the background, and it can be useful for running background jobs. Or you can leave a screen session connected to another machine: Run screen before you open the ssh session, then instead of logging out when you’re done, detach the screen, and then just reattach it (screen -r) when you need to connect to that machine again. The downside of this is that it does have security implications!
A final screen trick enables you to remotely look over a user’s shoulder if you’re trying to fix a problem.
xclip /path/to/file |
Log on to the user’s machine as him, then type
screen -S debug |
Then, get him to type
screen -x debug |
and he’ll join your screen session. After this, whatever he does will be replicated on your screen (and vice versa). (‘debug’ is the identifier; any other name would also be fine.) This can save a lot of time when trying to track down a problem or to explain a solution!
