Connect EC2 Linux Instance from windoWs machine
Owner: Aarav Raj Singh REF:aws docs
**ONLY FOR LEARNING PURPOSE**
CONNECT EC2 LINUX INSTANCE FROM WINDOWS MACHINE
To install OpenSSH on your Windows OS using PowerShell, you must be running PowerShell version 5.1 or later, and your account must be a member of the built-in Administrators group. Run $PSVersionTable.PSVersion from PowerShell to check your PowerShell version.
To check whether you are a member of the built-in Administrators group, run the following PowerShell command:
(New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
Using this method you can use the windows default terminal to Login into EC2 without key
- Login to AWS instances(ssh using pem file/Putty)
ssh -i your-key.pem username@ip_address
2. Setup a password for the user
sudo passwd ubuntu
3. Edit sshd_config file.(use vim or any other editor)
sudo vim /etc/ssh/sshd_config
Find the Line containing ‘PasswordAuthentication’ parameter and change its value from ‘no’ to ‘yes’
Press Esc →: →wq (Esc key. Then “:”, then “wq” and finally press enter. )
4. Restart the SSH service.
service ssh restart
5. Now you can log in using the password you set for the user.
ssh username@ip_address
Now it will ask for the password.
That’s it, You are logged into EC2



Comments
Post a Comment