Closed avivajpeyi closed 2 years ago
After following https://support.ehelp.edu.au/support/solutions/articles/6000149723-troubleshooting-ssh-access-to-a-nectar-instance
, i have still made little progress...
ssh -i ~/.ssh/nectarkey.pem ubuntu@136.186.108.84
ubuntu@136.186.108.84: Permission denied (publickey).
I don't think this error is to do with 1. the wrong key -- I had backed this up in my drive and fingerprints match See this Fingerprint (on Nectar)
56:d5:80:4a:05:1b:8f:bd:a3:6f:63:b7:d7:97:3a:b9
Key Fingerprint (on local)
ssh-keygen -E md5 -lf ~/.ssh/nectarkey.pem 2048 MD5:56:d5:80:4a:05:1b:8f:bd:a3:6f:63:b7:d7:97:3a:b9 no comment (RSA)
These match! Woohoo!
2. the username ('ubuntu') -- I am pretty sure this is standard? --THIS IS WHAT WAS WRONG: the username is 'ec2-user' as im on CentOS
3. the IP: 136.186.108.96, I checked this on the nectar
instance page
OMG I was using the wrong username -- ssh -i ~/.ssh/nectarkey.pem ec2-user@136.186.108.96
Trying to re-deploy the pages:
$ sudo yum update httpd
CentOS Linux 8 - AppStream 6.3 B/s | 38 B 00:06
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
From StackOverflow:
sudo sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
sudo yum update -y
the above seems to work! Still need to finish setting up Apache https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-centos-7
sudo yum install rsync
sudo yum remove httpd
sudo yum install httpd
vi /etc/httpd/conf.d/server-status.conf
Contents of /etc/httpd/conf.d/server-status.conf
<Location "/server-status">
SetHandler server-status
#Require host localhost #uncomment to only allow requests from localhost
</Location>
vi /var/www/html/index.html
contents of /var/www/html/index.html
hello world
sudo systemctl restart httpd
sudo yum install links
apachectl status
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disab>
Active: active (running) since Tue 2022-06-14 15:14:35 UTC; 34s ago
Docs: man:httpd.service(8)
Main PID: 23761 (httpd)
Status: "Running, listening on: port 80"
Tasks: 213 (limit: 49501)
Memory: 38.5M
CGroup: /system.slice/httpd.service
├─23761 /usr/sbin/httpd -DFOREGROUND
├─23762 /usr/sbin/httpd -DFOREGROUND
├─23763 /usr/sbin/httpd -DFOREGROUND
├─23764 /usr/sbin/httpd -DFOREGROUND
└─23765 /usr/sbin/httpd -DFOREGROUND
The VM on its own doenst have much memory -- 20GB. The volumes
are where most of the files should be stored.
https://tutorials.rc.nectar.org.au/volume-storage/04-format-mount
the atlas_vm
has a volume mounted at /mnt/storage/
. This is where the TESS Atlas should be stored
sudo scp avajpeyi@ozstar.swin.edu.au:/fred/oz200/avajpeyi/projects/atlas_runs/*.tar.gz /mnt/storage/pages.tar.gz
The website is being served from the dir /var/www/
. This dir does not have a large storage space. I need to set up a symlink to the pages stored in /mnt/storage/pages/
To serve the pages from a different directory, need to adjust the root-directory in the httpd.conf
:
vim /etc/httpd/conf/httpd.conf
to
and restart apache! systemctl restart httpd
Tut on accessing volumes https://supercomputing.swin.edu.au/rcdocs/volumes/
Really irritating -- Im getting a permission denied error when trying to
ssh
into the server! Cant upload the new site because of this :(