BashConfig
## Content
* [Project description](#chapter-0)
* [SSH](#chapter-1)
* [Tips](#chapter-2)
## Project description
Bash config files
## SSH
Create ssh key on local device
1. `ssh-keygen`
2. Save to `~/.ssh`
3. Enter passphrase
4. Copy content of `~/.ssh/id_rsa.pub` key to remote `~/.ssh/authorized_keys`
\
Add aliases for ssh to `~/.ssh/config`:
```
Host host_name
HostName ip
Port 22
User root
IdentityFile ~/.ssh/id_rsa
```
\
Using aliases:
```bash
ssh host_name
sftp host_name
```
## Tips
### Bash
| Command | Description |
|:------------------: | :------------------ |
|```Esc + .``` | Last object |
|```Ctrl + R``` | bash_history search |
|```history -d 130``` | Delete 130 line |
|```history -c``` | Delete all history |
### Vim
| Command | Description |
|:------------------: | :------------------------------------ |
|```Ctrl + [``` | Analog Esc |
|```d -> ctrl + end``` | Delete from cursor to end of file |
| ```u``` | Cancel last command |
| ```ctrl+r``` | Cancel cancel |
| ```22G``` | Go to line 22 |