ref README.md
This commit is contained in:
parent
2dc306201f
commit
30112a15ec
10
.bashrc
10
.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 "
|
||||
|
||||
39
README.md
39
README.md
@ -1,16 +1,38 @@
|
||||
# BashConfig
|
||||
<h1 align="center">BashConfig</h1>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/Pendosv">
|
||||
<img src="https://img.shields.io/github/followers/Pendosv?label=Follow&style=social">
|
||||
</a>
|
||||
<a href="https://github.com/Pendosv/BashConfig">
|
||||
<img src="https://img.shields.io/github/stars/Pendosv/BashConfig?style=social">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
## Content
|
||||
* [Project description](#chapter-0)
|
||||
* [SSH](#chapter-1)
|
||||
|
||||
|
||||
<a id="chapter-0"></a>
|
||||
## Project description
|
||||
|
||||
Bash config files
|
||||
|
||||
|
||||
<a id="chapter-1"></a>
|
||||
## 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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user