Updated: June 11th, 2015

imageDuring my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.

Update #1: In response to a few people saying this list is too short and “[he] could've added something to it, to atleast make it look longer” (quote from one of Stumbleupon

Share
1

Debugging Weird sshd Connection Problems + What Happens When You Stop sshd


Posted by Artem Russakovskii on August 15th, 2008 in Linux

So the other day I was setting up public key authentication for one of my users, which is usually very straightforward: generate a private/public key pair, stick the private key into user's .ssh dir, set dir permissions to 0700, private key permissions to 0600, stick the public key into the authorized_keys file on the server, and the job's done. However, this time, no matter what I was doing, the public key was being rejected or ignored and the system was moving on to the keyboard-interactive authentication.

Debugging on the client side with -v didn't help much:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[email protected]:~/svn/b2/Fetch/LinkChecker> ssh -v 

Share
4

Some Useful vim Commands – My vim Cheatsheet


Posted by Artem Russakovskii on April 9th, 2008 in Linux, My Favorites, Programming

Updated: April 23rd, 2008

[WORK IN PROGRESS] Here is a list of commands that I use every day with vim, in no particular order. Out of a billion possible key combinations, I found these to be irreplaceable and simple enough to remember.

     

    *

    search for the word under cursor (to the end of the file)

    #

    search for the word under cursor (to the top of the file)

    ctrl-p,ctrl-n

    suggest (p)revious or (n)ext autocomplete from the list of existing keywords in the file or included files (!).

    :go NNN

    go to byte NNN

    .

    redo last command

    /SEARCH TERM

    search document for SEARCH TERM

    :%s/FOO/BAR/gci

    replace FOO with BAR (g)lobally, case (i)insensitively, and asking for (c)onfirmation

Share