Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
ssh [2015/06/01 17:31] steve |
ssh [2015/07/17 15:21] steve |
||
---|---|---|---|
Line 65: | Line 65: | ||
iptables -A rate-limit -j DROP | iptables -A rate-limit -j DROP | ||
iptables -I INPUT 1 -p tcp --dport 22 -j rate-limit | iptables -I INPUT 1 -p tcp --dport 22 -j rate-limit | ||
+ | </code> | ||
+ | |||
+ | ==== Gotchas ==== | ||
+ | |||
+ | ** Running ''ssh'' in a while loop exits early ** | ||
+ | |||
+ | ''ssh'' may be reading things from stdin, so pipe ''/dev/null'' to it directly: | ||
+ | |||
+ | <code> | ||
+ | ssh < /dev/null | ||
</code> | </code> |