Changes between Version 1 and Version 2 of NspwUprouse/Agenda/ssh


Ignore:
Timestamp:
Sep 5, 2021, 6:01:00 PM (3 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NspwUprouse/Agenda/ssh

    v1 v2  
    77== Setting up virtualbox ==
    88
    9 === Installation of VirtualBox and Downloading Ubuntu iso image ===
    10  - Download and install VirtualBox
     9=== Installation of !VirtualBox and Downloading Ubuntu iso image ===
     10 - Download and install !VirtualBox
    1111 - Download Ubuntu image from [https://releases.ubuntu.com/20.04.3/ubuntu-20.04.3-live-server-amd64.iso here]
    1212 - Note down the location of the downloaded iso file
    1313
    1414=== Creating the VM ===
    15  - Start virtualbox and Click on New button (at top-right) to create new virtual machine
     15 - Start virtualbox and Click on New button to create new virtual machine
    1616 - Enter name of the VM as: '''Ubuntu'''.
    1717 - Select OS Type: '''Linux'''
     
    2828This might take a couple of minutes
    2929
    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)
    3131
    3232=== Setting up Network Interface ===
     
    4949
    5050
    51 == Password Based Authentication ==
     51== Password-Based Authentication ==
    5252 - Go to your host machine.
    5353 - Start PuTTY utility, by double-clicking on its .exe file.
     
    5656
    5757 - Click open.
    58  - It will ask for username followd by password.
     58 - It will ask for a username followed by a password.
    5959 - Logout/close this session.
    6060
     
    6565
    6666 - Start the PuTTYgen utility, by double-clicking on its .exe file.
    67  - For Type of key to generate, select SSH-2 RSA
     67 - For the type of key to generate, select SSH-2 RSA
    6868 - 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).
    6969 - Click the Generate button.
     
    7575 - A private/ public key pair has now been generated.
    7676 - 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 .
    7878 -  Right-click in the text field labeled Public key for pasting into OpenSSH authorized_keys file and choose Select All.
    7979[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netsec2018ssh/puttygen2.png)]]
     
    8585Now, you need to paste the copied public key in the file ~/.ssh/authorized_keys on your server.
    8686
    87  - Log in to your destination server using putty with username apnic
     87 - Log in to your destination server using putty with your username
    8888 - If your SSH folder does not yet exist, create it manually
    8989{{{
     
    103103In 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.
    104104 - 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- hand side of the window).
    106  - In the Host Name field, enter the IP address/Hostname of ssh server
     105 - 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
    107107 - Enter the port number in the Port field as 22
    108108 - Along the left-hand side of the window, select Connection > SSH > Auth
     
    144144 - Scan the QRcode that appears with the Google Authenticator app or you can add the secret key Google Authenticator app.
    145145 - 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.
    147147{{{
    148148Do you want me to update your "/home/myuser/.google_authenticator" file (y/n)
     
    187187=== Login to the server ===
    188188Try to ssh to the server from a new terminal. It will ask for the verification code.
     189
     190== Extra ==
     191
     192If 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.