.mrt memo

tail -f /dev/mind > blog

Posts Tagged ‘cli

Putty and Openssh

without comments

Putty is a nice cross-platform toolset with terminal emulator and keypair generation tool (puttygen) among others, but when you want to take your keypair with you to a normal Linux environment (meaning OpenSSH and the ~/.ssh directory), then you cant just copy-paste the keys under the .ssh directory. There are some formatting issues and after some research I found out that fortunately you can convert a Puttygen generated keypair into normal OpenSSH format. So here’s a memo of these commands (-O means what to export and -o gives the name of an output file):

puttygen putty_generated_private_key_file.ppk -O private-openssh -o id_rsa

puttygen putty_generated_private_key_file.ppk -O public-openssh -o id_rsa.pub

After that you just copy-paste the id_rsa and id_rsa.pub files under your ~/.ssh directory.

Further reading:
puttygen man page

Written by dotmrt

2008/07/22 at 22:04:39

Posted in it

Tagged with , , , ,

How to get Ubuntu version and nickname

without comments

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 7.10
Release:        7.10
Codename:       gutsy

As you can see, it also mentions that annoying codename that I keep forgetting. Now I’ll hope I’ll remember that command.

Written by dotmrt

2008/03/26 at 20:03:17

Posted in ubuntu

Tagged with , , , ,

Bash keyboard shortcuts

without comments

Here’s a piece of useful information to all who have to use Unix/Linux CLI once in a while.

Via How-To-Geek.

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names

Written by dotmrt

2008/03/19 at 21:55:20

Posted in it, linux, ubuntu

Tagged with , , , ,