- Place the cursor at the beginning of the file
Ctr + 6to set a markAlt + Shift + T(or tryAlt + T) to cut to the end of the file- If
Alt + Tdoesn't work, tryCtrl + K - To just copy the file content do
Ctrl + Uto uncut the text again
ssh -i /drive/path/file user@serverssh-keygen -o
ssh-keygen -m PEM -t rsa -b 4096On the local machine run:
ssh-copy-id -f -i ~/.ssh/mykey user@host_or_ip## Allow connection with Password to insert new SSH key on remote:
sudo nano /etc/ssh/sshd_config
## Change `PasswordAuthentication no` to `PasswordAuthentication yes`
## CTRL + X (exit) --> y (yes) --> Enter (save)
## Restart SSH services:
sudo service ssh restart
sudo service sshd restart
## Here upload the new SSH key from the local machine.
## After the new SSH key is inserted on the remote machine,
## disable password authentification again:
sudo nano /etc/ssh/sshd_config
## Change `PasswordAuthentication yes` to `PasswordAuthentication no`
## CTRL + X (exit) --> y (yes) --> Enter (save)
## Restart SSH services:
sudo service ssh restart
sudo service sshd restart
exit## Folders only:
tree -d /path/to/folder/
## Folders and files:
tree /path/to/folder/
## Flags (source: https://linux.die.net/man/1/tree):
## -d directories only
## -L # Recursion depth (replace `#` with a number)
## -C Add color to the output--> https://dev.to/flyingduck92/add-tree-to-git-bash-on-windows-10-1eb1
du -sh
## Remember "DOOSH" --> du -sh
ncdusudo apt-get install ncdu
ncduSource: https://wiki.ubuntuusers.de/Festplattenbelegung/
## Preparation:
sudo apt-get install cifs-utils