Skip to content

Instantly share code, notes, and snippets.

@Prince-Mandor
Last active December 22, 2016 15:21
Show Gist options
  • Save Prince-Mandor/c1675e180109a73a7ecbaca82d4c8b8d to your computer and use it in GitHub Desktop.
Save Prince-Mandor/c1675e180109a73a7ecbaca82d4c8b8d to your computer and use it in GitHub Desktop.

Converting SSH2 keys (PuTTY) to OpenSSH

ssh-keygen -i -f ssh2.pub > openssh.pub

and vise versa

ssh-keygen -e -f openssh.pub > ssh2.pub

Upload file to server with ssh

scp [source file] [username]@[destination server]:.

remove all strings with same PID as IP (BUG:dots unescaped)

sed -n '/212.129.27.25/{s/.* \(PID .*:\).*/\1/p}' /var/log/unprocessed | while read result; do sed -i.bak -n "/$result/"'!p' /var/log/unprocessed;  done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment