Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Private Communication and Remote Shell with RSA
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
I've had a working RSA public/private keypair for SSH for a while now, but recently, I've gotten into using RSA for encrypted communication. Here's a step-by-step guide for Mac/Linux (or other Unix-based systems.)
Generating Keypairs
Run this command in your favorite terminal:
and fill out the info it wants (it won't be intrusive, I promise.)
This will generate two files, a private key (id_rsa by default) and a public key (id_rsa.pub by default.)
Never share your private key with anyone. Guard this file like a credit card number and CVC code.
Public Keys
You can share your public key with whoever you want. This allows people to securely identify you on applications such as SSH, or send you encrypted messages.
SSH
SSH is short for Secure Shell. It allows you to access terminal sessions on remote computers. You can use passwords instead of a RSA keypair, but this is much less secure. The command is:
Private Communication
RSA is, after all, nothing more than a way to keep information secret. This includes messages. Using this script I wrote, you can encrypt messages using someone's GitHub username (looks up the public key automatically) and decrypt them using your private key.
The syntax to encrypt is:
and to decrypt is:
Public Key Library
If anyone wants to share their public key, I'll host a library here. Simply post your public key on this thread to be added.
Generating Keypairs
Run this command in your favorite terminal:
ssh-keygen -t rsa -C "your@preferredemail.com"
This will generate two files, a private key (id_rsa by default) and a public key (id_rsa.pub by default.)
Never share your private key with anyone. Guard this file like a credit card number and CVC code.
Public Keys
You can share your public key with whoever you want. This allows people to securely identify you on applications such as SSH, or send you encrypted messages.
SSH
SSH is short for Secure Shell. It allows you to access terminal sessions on remote computers. You can use passwords instead of a RSA keypair, but this is much less secure. The command is:
ssh user@example.com
Private Communication
RSA is, after all, nothing more than a way to keep information secret. This includes messages. Using this script I wrote, you can encrypt messages using someone's GitHub username (looks up the public key automatically) and decrypt them using your private key.
The syntax to encrypt is:
./crypto.sh username <message.txt
./crypto.sh <encrypted.txt
Public Key Library
If anyone wants to share their public key, I'll host a library here. Simply post your public key on this thread to be added.
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDgaZl8aU8iff1NC+ysj++X6egonWrZ/B/TNJV4U453gljJ1GrpM6XEAQu2sLJmcNCtKg6kMmHleq7NrWSAXZ2OOEV0DaFX+JFXwPofdUYDJJc4JhSfmYJ0gulCp6DEYdExcUSNNGH8PnIFRvreYlRzFl/TNpyUMk2y+8IiG0bXtdPMzJ4wJ8X6zNMy9eBNbZDNbN8cCDCzWKZLO6QdF3ThQOLrik3N344iPyWosUZ31JjK10MCGxy7oj6aCVTy8rY4sqEwKagDw+HmJZ85KgKuEWy+DcpMGomhnwSZ2/S+0HXMf8KUGm7sQknE4nQWBQJHOyGy5O8s3AO+OVtpqMx/xouNOrVwSayPzC6xIBAiIwY+neUKg/SMV+0Hxr9qSvh5H676PIXPKsjio3naFRAKQxjJRX41fHOXjHavYemcR3lfGhMPL9P+yjXF5KkEayMZmvTkLxSvz+iW+c+ZZjZkykvz9gzr1lYLfISiZ+z2FeJDG0Ku9AyUpu0ANzKtKQM+Df5CGVgyiGNQiuujqeW4wdhcfCXejlkDt28zAg38qaGwXmiWNH7zznyaK3xboqN+kcVpDuwdvQP5X0ZRtWFwkeiCLHtuvrenWup4tgQ2kBWaCbEbnEguSeihXEI8cot9ZgMlmnNGG6JhU/1CW6rv79XtuPdVqwFfD7eBHAGLcQ== geono@thegt.org
Last edited by GeonoTRON2000 (March 8, 2014 20:09:36)
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
Yes, I find it very useful as well. Intresting
- QuillzToxic
- Scratcher
1000+ posts
Private Communication and Remote Shell with RSA
What is this :3Yes, I find it very useful as well. Intresting
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
It's a cryptographic algorithm with a lot of applications.What is this :3Yes, I find it very useful as well. Intresting
Last edited by GeonoTRON2000 (March 4, 2014 03:17:58)
- davidkt
- Scratcher
1000+ posts
Private Communication and Remote Shell with RSA
…I don't use UNIX.
Remember when I looked like this? I still do.
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
You'll want to have a look at PuTTY.
- davidkt
- Scratcher
1000+ posts
Private Communication and Remote Shell with RSA
PuTTY.Ah. Would Cygwin work though? (I've never tried it) You'll want to have a look at
Remember when I looked like this? I still do.
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
Float, my Scratch 2.0 mod | My (somewhat under-construction) blog
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.PuTTY.Ah. Would Cygwin work though? (I've never tried it) You'll want to have a look at
- Gravitation
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
This is pretty cool! Using GitHub as a public key <-> user exchange is an interesting idea.
It's easier to install MingW and MSYS with OpenSSL/SSH than Cygwin imo; it only comes with core utilities so it's much faster to download, and the setup is tearless. You can just type `bash` into cmd after the installation and have a nice Linux terminal ready, no assembly required. Yay.Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.PuTTY.Ah. Would Cygwin work though? (I've never tried it) You'll want to have a look at
- GeonoTRON2000
- Scratcher
100+ posts
Private Communication and Remote Shell with RSA
Sweet, sounds good! This is pretty cool! Using GitHub as a public key <-> user exchange is an interesting idea.It's easier to install MingW and MSYS with OpenSSL/SSH than Cygwin imo; it only comes with core utilities so it's much faster to download, and the setup is tearless. You can just type `bash` into cmd after the installation and have a nice Linux terminal ready, no assembly required. Yay.Cygwin would probably work, although I'm not sure if it comes with the openssl and openssh libraries by default.PuTTY.Ah. Would Cygwin work though? (I've never tried it) You'll want to have a look at
- Discussion Forums
- » Advanced Topics
- » Private Communication and Remote Shell with RSA