diff --git a/.bashrc b/.bashrc index 5db8b7d..879516b 100644 --- a/.bashrc +++ b/.bashrc @@ -1,7 +1,4 @@ -if [ -f ~/.bash_aliases ]; then - source ~/.bash_aliases -fi close_color='\[\e[m\]' prompt_color='\[\033[;32m\]' @@ -9,7 +6,7 @@ info_color='\[\033[1;34m\]' prompt_symbol='ใ‰ฟ' end_symbol='$' -if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user +if [ "$EUID" -eq 0 ]; then # Change prompt colors and symbols for root user prompt_color='\[\033[;94m\]' info_color='\[\033[1;31m\]' prompt_symbol='๐Ÿ’€' @@ -17,5 +14,10 @@ if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user fi +if [ -f ~/.bash_aliases ]; then + source ~/.bash_aliases +fi + + # last PS1="\n$prompt_colorโ”Œโ”€โ”€($close_color$info_color\u$prompt_symbol\H$close_color$prompt_color)-[$close_color\w$prompt_color]\nโ””โ”€$close_color$info_color$end_symbol$close_color " diff --git a/README.md b/README.md index 5d52bdc..ac3f0ac 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,38 @@ -# BashConfig +

BashConfig

+

+ + + + + + +

+ + +## Content +* [Project description](#chapter-0) +* [SSH](#chapter-1) + + + +## Project description + +Bash config files + + + ## SSH: Create ssh key on local device -`ssh-keygen` +1. `ssh-keygen` +2. Save to `~/.ssh` +3. Enter passphrase +4. Copy content of `~/.ssh/id_rsa.pub` key to remote `~/.ssh/authorized_keys` -1. Save to `~/.ssh` -2. Copy content of `~/.ssh/id_rsa.pub` key to remote `~/.ssh/authorized_keys` - - -**~/.ssh/config:** +\ +Add aliases for ssh to `~/.ssh/config`: ``` Host host_name HostName ip @@ -19,7 +41,8 @@ Host host_name IdentityFile ~/.ssh/id_rsa ``` -*Examples:* +\ +Using aliases: ```bash ssh host_name sftp host_name