zondag 17 maart 2019

How to make ssh key


# Steps to take to make sshkeys for github
1. ssh-keygen -t rsa -b 4096 -f github_file -C "example"
2. create a passphrase
3. eval "$(ssh-agent -s)" # runs ssh-agent in the background
4. add the public key to your github account
5. ssh-add ~/.ssh/id_rsa # take the path of the private key
6. git remote set-url origin git@github.com:username/your-repository.git # use clone SSH of Gitlab and Github

zaterdag 16 februari 2019

vrijdag 1 februari 2019

SSH Key - Still asking for password and passphrase

Add Identity without Keychain

There may be times in which you don't want the passphrase stored in the keychain, but don't want to have to enter the passphrase over and over again.
You can do that like this:
ssh-add ~/.ssh/id_rsa 
This will ask you for the passphrase, enter it and it will not ask again until you restart.

Add Identity Using Keychain

As @dennis points out in the comments, to persist the passphrase through restarts by storing it in your keychain, you can use the -K option (-k for Ubuntu) when adding the identity like this:
ssh-add -K ~/.ssh/id_rsa
Once again, this will ask you for the passphrase, enter it and this time it will never ask again for this identity.

zondag 23 december 2018

PATH


You can skip the step of manually loading the library by letting Linux do it for you when you log in automatically.

Run below commands

echo ". $HOME/my_functions.lib" >> ~/.bashrc
echo ". $HOME/my_functions.lib" >> ~/.bash_profile
source ~/.bashrc
source ~/.bash_profile
That's it. You can directly execute your function from the command line without doing anything.

zaterdag 29 september 2018

vrijdag 14 september 2018

No USB device available in Virtualbox

"Please add your user name to the 'vboxusers' group with this command:

sudo adduser [$USER] vboxusers

After that you must logout and login.
Please check this for more details:

https://help.ubuntu.com/community/VirtualBox/USB"

https://superuser.com/questions/956622/no-usb-devices-available-in-virtualbox

woensdag 12 september 2018

Copying the same file to two locations

Copying the same file to two locations by using the cp command twice still seems logical but let us suppose we have to copy the file to three, five, or even more locations. Here is how a single command can achieve this purpose.

Syntax:

$ echo [destination1] [desctination2] [destiantion3]..... | xargs -n 1 cp [/location/sourcefile]

https://vitux.com/copying-one-file-simultaneously-to-multiple-locations-through-ubuntu-command-line/

Enlarging Libreoffice window completely with command

 You can open the LibreOffice window completely by pressing the CTRL+Shift+J keys together.