I ran the commands listed below to help solve the "Connection timed issue but they did nothing:
sudo systemctl status ssh
sudo apt update
audo apt install open-ssh server
When I run ssh user@ipaddress I get ssh: connect to host ipaddress port 22: Connection timed out
Here is the error I receive when I run the file in terminal:
./file.sh
Working...
Sending to users's device
ssh: connect to host ipaddress port 22: Connection timed out
abcd
[sudo] password for me:
sudo: a password is required
[sudo] password for me:
Failed to start apache2.service: Unit apache2.service is masked.
Unit rabbitmq-server.service could not be found.
Failed to start rabbitmq-server.service: Unit rabbitmq-server.service not found.
Unit mysql.service could not be found.
Failed to start mysql.service: Unit
mysql.service not found.
Here's the file:
#!/bin/bash
echo "Working..."
echo "Sending to users device"
ssh -t -p 22 users@ipadress
echo "abcd"
sudo systemctl status apache2
sudo systemctl start apache2
sudo systemctl status rabbitmq-server
sudo systemctl start rabbitmq-server
sudo systemctl status mysql
sudo systemctl start mysql
I'm not sure what to do next. I have tried so many things and they are not working. Is it my code? Any help would be appreciated.