Skip to main content

Posts

Public private key based login to Unix computer

Public private key based login to Unix computer We know that we can login to a Unix system in several ways. One drawback with username password mode is that there will be requirement to update the password frequently. In such cases, we go for the public key based login.  Required software 1. Putty and puttygen Putty can be downloaded from the download page of  https://www.putty.org/ The downloaded zip contains both putty and puttygen. 2. Winscp This is an optional software which gives a window when dealing with ssh, ftp, sftp connections. This can be downloaded from their official site. https://winscp.net/eng/download.php How it works In the public key based login, we will generate a public key and corresponding private key pair. We can optionally protect the private key using a password so that if someone gets your private key, they wont be able to put it into real use [The secret would be needed for loading your private key to the ssh client]. Process Create the publ...

Working with Vi editor in Unix

Working with Vi editor in Unix Vi is a very powerful text editor on Unix. The below resources will help you when dealing with the vi editor in Unix.  This article is intended to work as a basic starting point or something that you can use on a regular basis for the basic needs. In short, this is a vi survival toolkit. Basic operation modes 1. Command mode to execute commands on the file with respect to its content.      Pressing the Esc button will take you to the Command mode. 2. Insert mode to manipulate the text content within the file.      Pressing the "Insert" key will take you to the insert mode. Create or Opening a file vi filename It will create a file if does not exist, otherwise the file will be opened. Adding or editing text content As soon as you open a file in vi, you will be in command mode. To edit the content, press the "Insert" key. This will take you to the Insert mode. Add the content using the keyboard. Exiting the vi editor T...

Java Keystore - Certificate management

 Java Keystore - Certificate Management Dealing with the Java keystore is not new for the software developers working with Java. But many a times, developers who work with several other technology stack come across the necessity of dealing with java keystoe(jks). A simple, easy way to deal with it is given below. The software The software I am working with is KeyStore Explorer.  This software can be used on Windows, Linux and MacOS. Installable can be downloaded separately. If you are fan of portable apps, you can download the zip version that will work with all the operating systems. This software can be downloaded from the link below  https://keystore-explorer.org/downloads.html Setup Install as per your operating system. For portable version, simply unzip to the desired folder. The Keystore explorer needs a JRE to run. If your laptop has a pre-installed JRE, please make sure the JAVA_HOME environment variable is set. If you already have a portable JRE, you can copy ...

Zip and unzip in Linux

 Zip and unzip in Linux We can use the commands to zip and unzip the files or folders in Linux. Zip and unzip and such useful commands. The usage of the commands are described below. Zipping Create a zip file for a single file zip targetZipFilename.zip filetoZip.txt Add multiple files to the new zipfile zip targetZipFilename.zip filetoZip-1.txt filetoZip-2.txt Note : We can use wildcards for the filenames as needed. Add a file to existing zip file  zip -u existingZipFilename.zip filetoZip.txt Remove  single file from a zip file zip -d existingZipFilename.zip filetoRemoveFrom Zip.txt Zip directories and the contents zip -r ZipFilename.zip ./FolderInPWDToZip Note : -r is for recursive file selection. To zip everything in the present working directory zip -r ZipFilename.zip ./* Unzipping  The command without any arguments will unzip the contents to present folder. No additional folders will be created on extraction. Basic unzip  unzip zippedFile.zip Extract to ...

Termux - The android Terminal

Termux No hesitation, you can certainly call Termux “The Android terminal”. Owing to it’s simplicity and capabilities, Termux stand so close to the original Linux terminal. Who is it for and who should read this? This is beginner article which will introduce you to the fundamentals of using Linux terminal on android devices. To understand something here, you should barely understand English and nothing else is a pre-requisite. 🤓 Let us figure out the basics.   Android If you are using an android device, you know that android is the operating system that run the show on your mobile phone. Android is an operating system with its core based on Linux. In fact, android is based on a modified version of Linux optimized for mobile devices. Terminal Terminal is a command line interface which can be used to communicate with or control the Operating system. So, a linux terminal can be used to control a Linux device. Terminal is a tool that comes default with a full fat Unix or Linux opra...

Github - Basic commands

Github - Basic commands The windows portable git will work in most cases when you are working on Windows OS. Initiate the git in the current folder. Right click and open the git bash.  Opening the git client If on command line, git init should work. git init Cloning the entire remote repo to a local location with root folder name as the repo name. git clone https://github.com/rapidsailor/ShellScripts Now navigate to the the newly created folders. Use cd command as needed. Make some code changes.  To verify the changes and status git status Add any new files to the repo or add the changes to existing files. git add Commit the changes Commits all the changes to the remote repo. This may ask for your github user and password. git commit -m “comment for check-in” Note : Any file changes to be done using the vi, ( i for insert mode, put in some comments. All the lines starting with # will be ignored. put some new lines without # as starting char.) esc for going to com...