cd ~/.ssh/
ssh-keygen -t rsa
cp id_rsa.pub authorized_keys
chmod 700 .
chmod -R 600 ./*
chmod go-w ~/
Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc
ssh -L 8080:localhost:80 root@site.com -i D:\key.pem
Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
In case of empty file:
/etc/init.d/rsyslog restart
Match group sftp
ChrootDirectory /sftpdir
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
/sftpdir - must be own by root and has access to write only for root
groupadd sftp
usermod -a -G sftp user