openec2 Article Description

Debian 11 and Nginx – Part 3

SSH login and FileZilla file transfers


SSH Login

These are the shell commands I use. My iMac home directory has a subdirectory called PEM where I store all my key files (which are backed up elsewhere on the Cloud.)

ME@MY-iMac-2 ~ % su root
Password:
sh-3.2# pwd
/Users/ME
sh-3.2# cd PEM
sh-3.2# ssh -i "mydomain.com.pem" admin@ec2-xxx-xxx-xxx-xxx.ap-southeast-2.compute.amazonaws.com
Linux ip-xxx-xxx-xxx-xxx 5.10.0-31-cloud-amd64 #1 SMP Debian 5.10.221-1 (2024-07-14) x86_64.  (---> If using x86. You should be using ARM in preference)

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Aug  6 13:37:39 2024 from 144.6.125.35
[admin@mydomain.com: ~]$ sudo su
[root@mydomain.com: /home/admin]# set -o vi
[root@mydomain.com: /home/admin]# 

If you need to clear out the ssh logins:

sh-3.2# cd /var/root/.ssh
sh-3.2# ls
known_hosts	known_hosts.old
sh-3.2# :> known_hosts

As you can see, I am logged in as root user on the iMac. You need to set up root access on iMac.

See https://support.apple.com/en-au/102367 on how to do this.

Basically, Go to Finder > Go > /System/Library/CoreServices/Applications/ > Directory Utility.app

Unlock the app. To enable the root user, choose Edit > Enable Root User from the menu bar. Then enter the password you want to use.

Note: we do not configure anything in Debian until we add disk swap space – next lesson.[/vc_wp_text][mk_padding_divider][vc_wp_text]


FileZilla

Fill out the FileZilla details as shown below with your own values, save it, then click on Connect.
This assumes you have Port 22 open in your Security Group inbound rules, and that you have added the security group to the instance.
If you need to, you can use the instance’s Actions menu to add the security group.

I prefer to assign my broadband static IP address to the security group.

We are now ready to configure Linux. Please log into your EC2 instance from a shell terminal.

When you login, remember to use “sudo su”.