Giter Club home page Giter Club logo

ironssh's Introduction

IronSSH - End-to-end secure file transfer

An alternative to sftp and scp that keeps files encrypted after they're uploaded and allows sharing of files with cryptographic enforcement. See the project homepage for more details.

This project is a fork of the openssh/openssh-portable project from OpenSSH. While most of the project is unchanged, specific additions have been made to create new executables that provide end-to-end security when transferring files to remote servers.

While sftp and scp use ssh to keep files secure while they are being transferred over the network, once those files hit the remote server, they are no longer protected. The ironsftp executable provides additional security. When you put a file on the server using ironsftp, the file is encrypted before it is uploaded, and it stays that way on the server. When you get a file from the server, it is downloaded then decrypted. So the file remains secure until it is at the place you want to use it - on your local machine.

The extension .iron is used to denote secured files. If you run ironsftp and put foo.c on the server, the file will first be encrypted and written to foo.c.iron, then that encrypted file will be written to the remote server. When you get foo.c.iron from the server, if that file can be downloaded, ironsftp will decrypt the file and write foo.c on your local machine. As a convenience, if you get foo.c but that file is not available on the server, ironsftp will try to download and decrypt foo.c.iron.

The process operates the same as sftp, but your files are protected on the remote server.

Key Management

In order to use ironsftp, you must currently have an RSA key in the ~/.ssh/id_rsa file on your local machine. When you start ironsftp the first time, it reads your public and private RSA keys (which may prompt you to enter the passphrase for the private key), then copies them into new key files under ~/.ssh/ironcore/. The RSA key is used for signing encrypted files. ironsftp also generates a Curve25519 key pair - this key is stored in the same place and is used to encrypt data. These new private keys are locked using a passphrase that is generated by using your private ssh RSA key to sign some data. Thus, if your ssh key is locked by a passphrase, your ironcore keys are also locked. Unlocking the ssh key is required to unlock the ironcore keys.

When you use ironsftp to connect to a server, your public key information is uploaded to ~/.ironpubkey. This provides a convenient mechanism for other users connecting to the server to retrieve your public ironcore keys. In particular, if another user connects to the server using ironsftp, she can use your public key information to securely share files with you, as described in the next section.

Secure Sharing

You are also able to share these secure files with other users. When you connect to a server, by default, each file that you upload will be encrypted so that only you can read it. However, if other users on that server have connected to it using ironsftp, their public key information will be available in ~<login>/.ironpubkey. You can use new ironsftp commands to add recipients, so that any subsequent files you upload in that session will be encrypted to those users in addition to you. For example, suppose you are logged in as gumby:

  % ironsftp BigServer
  Connected to BigServer.

  ironsftp> showrcpt
  Currently registered recipients:
    gumby
  ironsftp> addrcpt pokey
  Added login pokey to the recipient list
  ironsftp> addrcpt mrhand
  Unable to retrieve public keys for user mrhand.
  ironsftp> showrcpt
  Currently registered recipients:
    gumby
    pokey
  ironsftp> put foo
  Uploading foo to /home/gumby/foo.iron
  ironsftp>

The file foo.iron on the server is encrypted so that both you and pokey can retrieve and decrypt it. Suppose pokey does

  % ironsftp BigServer
  Connected to BigServer.

  ironsftp> get foo
  Fetching /home/pokey/foo.iron to foo.iron
  Data was encrypted to user gumby
  Message was signed by user gumby, key ID 1234567890ABCDEF.

The file foo.c.iron will be decrypted automatically, and the file foo will be created. If a user other than gumby or pokey downloads the file, she would get a message like this

  ironsftp> get foo
  Fetching /private/tmp/sftp.c.iron to sftp.c.iron
  WARNING: The file "foo" is encrypted, but access is not granted to you,
  so the unencrypted contents cannot be retrieved.

The user would still have foo.iron in the current directory, but it would not be readable.

GnuPG Compatibility

The keys used by ironsftp are stored in the same format that GnuPG uses - public keys are all in ~/.ssh/ironcore/pubring.gpg, and the corresponding secret keys are in individual files in ~/.ssh/ironcore/private-keys-v1.d. All files encrypted by ironsftp can be read by gpg as well. (Since we are using elliptic curve cryptography to encrypt the data, you will need a gpg version 2.1.7 or greater, which in turn requires libgcrypt version 1.7 or later.) If you have a modern version of gpg, you can run something like this to decrypt a file encrypted by ironsftp:

  gpg --homedir ~/.ssh/ironcore -d --output foo foo.iron

Installation

See the project page installation section for supported operating systems and installation details.

ironssh's People

Contributors

4a6f656c avatar bentley avatar bobwall23 avatar botovq avatar daztucker avatar didickman avatar djm-google avatar djmdjm avatar gleydsonsoares avatar hallexander avatar hogand avatar ischwarze avatar jcourreges avatar jcs avatar jonathangray avatar mbelop avatar mfriedl avatar mouring avatar semarie avatar sthen avatar zmre avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.