Last active
September 30, 2018 04:28
-
-
Save rsyuzyov/6616c548b94bac003c476e0ee1648170 to your computer and use it in GitHub Desktop.
ssh-tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# создаем ключ | |
ssh-keygen -b 2048 | |
# копирование отркытого ключа | |
ssh-copy-id user@server | |
# или | |
cat ~/.ssh/id_rsa.pub | ssh user@server:~/.ssh/authorized_keys | |
# копирование на remote | |
scp ~/.ssh/id_rsa.pub | |
# подключение фаловой системы remote через fuse | |
apt install sshfs | |
sshfs user@server:/home /media/server -o reconnect | |
# проброс stdin/out | |
ssh user@server command > my_file | |
my_command |scp — user@server:/path/remote_file | |
# альясы | |
~/.ssh/config: | |
Host myhost | |
Hostname host.net.local | |
User my_user | |
ForwardX11 yes | |
Compression yes | |
PasswordAuthentication no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment