Tag Archives: shell

ssh-copy-id and sshd port

For security purposes, I don’t run sshd on the default port (22). This gave me some problems when attempting to use the command ssh-copy-id. Ideally, you’d expect the following to work:   ssh-copy-id -p XXXX -i ‘~/.ssh/id_rsa.pub’ username@host However, that didn’t do anything but output an error: Bad port ‘umask 077; test -d .ssh || mkdir

Read More

Recursive chmod Tricks

Recursively chmod only directories: find . -type d -exec chmod 755 {} \;   Similarly, recursively set the execute bit on every directory chmod -R a+X * The +X flag sets the execute bit on directories only   Recursively chmod only files: find . -type f -exec chmod 644 {} \;   Recursively chmod only

Read More

Ngrep and p2p

This the command I use to track down P2P conenctions through my networks: ngrep -t -d ETH00:00 -q -i -W single -l \ ‘info_hash|torr|bitt|vuze|azue|tracker|edonk|aza|lime|emule\ |gift|gnutella|frostwire|morpheus|bearshare|uTorrent’ Note: it should all be on one line. -i is ignore case -w is word-regex (expression must match as a word) -l is make stdout line buffered -t is print

Read More

Bad Behavior has blocked 181 access attempts in the last 7 days.