SWick

Sysadmin-by-Nature

Entries from November 2022.

ssh-last released
12th November 2022

The ssh-tools collection has a new member: ssh-last

It is like last but for SSH sessions:

LOGIN            LOGOUT           DURATION   USER   HOST         PORT   AUTH_ID
Aug 14 03:45:34  Aug 14 03:48:06  00:02:32   swick  JumpHost     40548  (C) swick@company
Aug 26 22:20:02  Aug 26 22:20:02  00:00:00   swick  192.168.1.5  48856  (?) password
Oct 14 13:43:49  Oct 14 13:44:29  00:00:40   root   192.168.1.5  45828  (K) sven.wick@gmx.de
Nov 02 12:16:58  still logged in  241:22:12  swick  192.168.1.5  59198  (K) SSHFS Mount
No tags
My New Shell Prompt
14th November 2022

User

export PROMPT_DIRTRIM=2

git_branch() {

  BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')

  [[ ! -z $BRANCH ]] && echo "[${BRANCH}] "

}

PS1='\n \w \[\e[33;1;12m\]$(git_branch)\[\033[0m\][\[\033[0;96m\]>\[\033[0m\]] '

root

export PROMPT_DIRTRIM=2

git_branch() {

  BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')

  [[ ! -z $BRANCH ]] && echo "[${BRANCH}] "

}

PS1='\n \w \[\e[33;1;12m\]$(git_branch)\[\033[0m\][\[\033[0;91m\]>\[\033[0m\]] '
No tags

RSS Feed

"People said I should accept the world. Bullshit! I don't accept the world." -- Stallman