Changes between Version 1 and Version 2 of NspwUprouse/Agenda/ssh
- Timestamp:
- Sep 5, 2021, 6:01:00 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NspwUprouse/Agenda/ssh
v1 v2 7 7 == Setting up virtualbox == 8 8 9 === Installation of VirtualBox and Downloading Ubuntu iso image ===10 - Download and install VirtualBox9 === Installation of !VirtualBox and Downloading Ubuntu iso image === 10 - Download and install !VirtualBox 11 11 - Download Ubuntu image from [https://releases.ubuntu.com/20.04.3/ubuntu-20.04.3-live-server-amd64.iso here] 12 12 - Note down the location of the downloaded iso file 13 13 14 14 === Creating the VM === 15 - Start virtualbox and Click on New button (at top-right)to create new virtual machine15 - Start virtualbox and Click on New button to create new virtual machine 16 16 - Enter name of the VM as: '''Ubuntu'''. 17 17 - Select OS Type: '''Linux''' … … 28 28 This might take a couple of minutes 29 29 30 (Note down the location of vdi image file when VirtualBox flashes it on the screen)30 (Note down the location of vdi image file when !VirtualBox flashes it on the screen) 31 31 32 32 === Setting up Network Interface === … … 49 49 50 50 51 == Password 51 == Password-Based Authentication == 52 52 - Go to your host machine. 53 53 - Start PuTTY utility, by double-clicking on its .exe file. … … 56 56 57 57 - Click open. 58 - It will ask for username followd bypassword.58 - It will ask for a username followed by a password. 59 59 - Logout/close this session. 60 60 … … 65 65 66 66 - Start the PuTTYgen utility, by double-clicking on its .exe file. 67 - For Type of key to generate, select SSH-2 RSA67 - For the type of key to generate, select SSH-2 RSA 68 68 - In the Number of bits in a generated key field, specify either 2048 or 4096 (increasing the bits makes it harder to crack the key by brute-force methods). 69 69 - Click the Generate button. … … 75 75 - A private/ public key pair has now been generated. 76 76 - In the Key comment field, enter your email address. 77 - The Key passphrase field & re-type the same passphrase in the Confirm passphrase field. 9.Click the Save private key button and save as private_key .77 - The Key passphrase field & re-type the same passphrase in the Confirm passphrase field. Click the Save private key button and save as private_key . 78 78 - Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All. 79 79 [[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netsec2018ssh/puttygen2.png)]] … … 85 85 Now, you need to paste the copied public key in the file ~/.ssh/authorized_keys on your server. 86 86 87 - Log in to your destination server using putty with username apnic87 - Log in to your destination server using putty with your username 88 88 - If your SSH folder does not yet exist, create it manually 89 89 {{{ … … 103 103 In PuTTY, you can create (and save) profiles for connections to your various SSH servers, so you don't have to remember, and continually re-type, redundant information. 104 104 - Start PuTTY by double-clicking its executable file. 105 - PuTTY's initial window is the Session Category (navigate PuTTY's various categories, along the left- 106 - In the Host Name field, enter the IP address/Hostname of ssh server105 - PuTTY's initial window is the Session Category (navigate PuTTY's various categories, along the left-hand side of the window). 106 - In the Host Name field, enter the IP address/Hostname of the ssh server 107 107 - Enter the port number in the Port field as 22 108 108 - Along the left-hand side of the window, select Connection > SSH > Auth … … 144 144 - Scan the QRcode that appears with the Google Authenticator app or you can add the secret key Google Authenticator app. 145 145 - Save the backup codes listed somewhere safe. They will allow you to regain access if you lose your phone with the Authenticator app. 146 - Next it will ask several question; unless you have a good reason to, the defaults presented are sane. Just enter "y" for them.146 - Next, it will ask several questions; unless you have a good reason to, the defaults presented are sane. Just enter "y" for them. 147 147 {{{ 148 148 Do you want me to update your "/home/myuser/.google_authenticator" file (y/n) … … 187 187 === Login to the server === 188 188 Try to ssh to the server from a new terminal. It will ask for the verification code. 189 190 == Extra == 191 192 If you are a MAC OS or Linux GUI user, you may try https://www.informaticar.net/configure-passwordless-ssh-login-in-linux/ for two way authenticated SSH.