AWS S3 bucket webhosted using Github Action
Github Action for deployment of Static-website to AWS S3 Bucket
Everything you need to know about ...
The SSH protocol recommended a method for remote login and remote file transfer which provides confidentiality and security for data exchanged between two server systems. The SSH depends upon the use of public key cryptography. The OpenSSH server offers this kind of setup under Linux or Unix-like system. This how-to covers generating and using ssh public keys for automated usage such as
ssh-keygen
ssh-copy-id user@remote-server-ip-name
ssh user@remote-server-ip-name
Let us see all commands in details.
First, log on to your workstation. For example, log on to workstation called admin.fbsd.nixcraft.org as vivek user. Please refer the following sample setup. You will be logged in, on your local system, AS THE USER you wish to make passwordless ssh connections.
To create the cryptographic keys on your local system powered by FreeBSD/Linux/macOS/ UNIX workstation, enter:
ssh-keygen -t rsa
Assign the pass phrase (press [enter] key twice if you don’t want a passphrase). It will create 2 files in ~/.ssh directory as follows:
~/.ssh/id_rsa : identification (private) key
~/.ssh/id_rsa.pub : public key
Use the scp command to copy the id_rsa.pub (public key) from your local system to rh9linux.nixcraft.org remote server as authorized_keys file, this is know as, “installing the public key to server”:
scp ~/.ssh/id_rsa.pub vivek@rh9linux.nixcraft.org:~/.ssh/authorized_keys
Another option is to use the ssh-copy-id command as follows from your local workstation:
ssh-copy-id user@remote-box
ssh-copy-id -i ~/.ssh/id_rsa.pub vivek@rh9linux.nixcraft.org
From your local system (e.g. FreeBSD/macOS/Linux/Unix workstation) type the following command:
ssh user@remote-box
ssh vivek@rh9linux.nixcraft.org
To change a passphrase for your ssh keys, use the ssh-keygen command as follows:
ssh-keygen -p
OR
cd ~/.ssh/
ssh-keygen -f id_rsa -p
You can use the ssh-agent command to avoid continues passphrase typing at the CLI:
ssh-agent $SHELL
ssh-add
Now ssh server will not use prompt for the password. Above two commands can be added to your ~/.bash_profile file so that as soon as you login into workstation you can set the agent.
To list keys, enter:
ssh-add -l
To delete all keys, enter:
ssh-add -D
To remove specific key, enter:
ssh-add -d key