-
-
Save zfy3000163/c2c9042421fb036da6bdd18b85350b97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 over sctp в freebsd | |
| cd /usr/ports/security/openssh-portable | |
| make config | |
| # тут ставим галочку SCTP | |
| make install clean | |
| # заставляем работать портовый sshd только по протоколу sctp параллельно базовому sshd | |
| ee /usr/local/etc/ssh/sshd_config | |
| Port 22 | |
| Transport sctp | |
| ee /etc/rc.conf.local | |
| openssh_enable="YES" | |
| openssh_skipportscheck="YES" | |
| service openssh restart | |
| #проверяем что слушается: | |
| netstat -n -p sctp | |
| #соединяемся | |
| /usr/local/bin/ssh -z ::1 | |
| /usr/local/bin/ssh -z 127.0.0.1 | |
| #удобный алиас ssz ::1 в ~/.bashrc | |
| ssz() { /usr/local/bin/ssh -z -t $* screen -DR; } | |
| #на клиенте удобнее всего иметь второй known_hosts, иначе базовый и портовый клиент будут ругаться при соединении к одному хосту | |
| ee /usr/local/etc/ssh/ssh_config | |
| UserKnownHostsFile ~/.ssh/known_hosts_sctp | |
| # или на сервере в ee /usr/local/etc/ssh/sshd_config прописать все HostKey от базового | |
| # HostKey for protocol version 1 | |
| HostKey /etc/ssh/ssh_host_key | |
| # HostKeys for protocol version 2 | |
| HostKey /etc/ssh/ssh_host_rsa_key | |
| HostKey /etc/ssh/ssh_host_dsa_key | |
| HostKey /etc/ssh/ssh_host_ecdsa_key | |
| #если на сервере ipfw запрещает все: | |
| ipfw add 50132 pass sctp from any to me 22 | |
| ipfw add 50132 pass sctp from me 22 to any |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment