Code Monkey home page Code Monkey logo

vera-cli's Introduction

vera-cli

A set of command-line tools to make it easier to use VeraCrypt for password-protected volumes.

Why (start with why)

If you decided to use password-protected volumes, this set of tools:

  • avoids you from having to find where your encrypted disk is attached (e.g. is it '/dev/sdb1'?) - just pass the disk vendor/model name,
  • allows you to quickly mount / unmount volumes without typing passwords - just create small wrapper scripts in your PATH (assuming your hard drive is encrypted...),
  • allows you to execute scripts (e.g. backup scripts) on your password-protected volumes,
  • avoids unnecessary backups by mounting by default volumes as read-only - pass -w to mount as read-write.

Requirements

The following tools are used:

  • VeraCrypt,
  • lsblk to lookup disks by vendor name / disk model (installed by default on Ubuntu).

Usage

To mount password-protected volumes or encrypted file-containers, use v-mount:

# Mount a disk as read-write using the disk vendor name and use a default veracrypt mount point
v-mount -p "password" -V "Kingston" -w

# Mount a disk as read-write using the disk model and use a default veracrypt mount point
v-mount -p "password" -M "Samsung T5" -w

# Mount a disk as read-write by specifying the block device and the mount point
v-mount -p "password" -v /dev/sdb1 -m /mnt/data -w

# Mount an encrypted file-container as read-write and specify the mount point
v-mount -p "password" -v volume.tc -m /mnt/data -w

# See more options
v-mount -h

To mount password-protected volumes or encrypted file-containers and browse them, use v-imount. Press Ctrl+D when you are done and the volume will be unmounted automatically. For instance, you can create a wrapper script in your path to quickly mount your encrypted USB drive:

#!/bin/bash

v-imount -M "Samsung T5" -p "password" $@

To automatically backup to your encrypted volumes / file-containers, create a wrapper script in your path that you can execute easily whenever you want to perform a backup. e.g. with the script examples/backup that backs up the home folder:

#! /bin/bash

v-mount-and-exec -V Kingston -p "password" -w -- "backup $@"

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.