Create a Temporary Proxy Using Only Netcat
Use the following to create a temporary tcp proxy using only netcat:
nc -l <source port> --sh-exec "nc localhost <dest port>"
- Read more about Create a Temporary Proxy Using Only Netcat
- Log in to post comments
Extract Public SSH Key from Private Key
The following will extract the public key from a private key. This assumes your private key is call id_rsa and public key is called id_rsa.pub. This can also be used to validate a public/private key are a match.
ssh-keygen -y -f .ssh/id_rsa
This should match the output of the following:
cat .ssh/id_rsa.pub
- Read more about Extract Public SSH Key from Private Key
- Log in to post comments
Reset SSH password on OctoPrint
1. power off the pi, remove the MicroSD card, and put that in a PC.
2. Then in the drive called "boot", create a file named "octopi-password.txt"
3. In that text file ("octopi-password.txt") you only need the password you want to set for the "pi" user, nothing else. So it will be one word only in this file.
4. Now take the MicroSD out of the PC, install it in the pi and boot it.
5. You can now log in again using SSH, with username "pi" and the password you set in the file "octopi-password.txt".
- Read more about Reset SSH password on OctoPrint
- Log in to post comments
Remove Accent Characters From Subtitle File
The method below can be used to convert any accent characters to "?" in a text file. This method can be used to strip accent characters from a subtitle file. The purpose for this is some muxing programs such as dvdauthor will error out when finding these characters.
The method below just converts them to "?". But you can write the results out to a different file then diff against the original to figure out where the characters are then manually convert them if you like.
- Read more about Remove Accent Characters From Subtitle File
- Log in to post comments
Simple Command To Copy Filesystems
This will copy a file system from the "/source/dir" to the "/destination/dir".
Note: The source directory can also be / and it will copy correctly.
cd /source/dir tar -cf - . | ( cd /destination/dir ; tar -xpvf - )
- Read more about Simple Command To Copy Filesystems
- Log in to post comments