我运行了下面列出的命令来帮助解决“连接计时问题”,但它们没有任何作用:
sudo systemctl status ssh
sudo apt update
audo apt install open-ssh server
当我跑步时ssh user@ipaddress
我得到ssh: connect to host ipaddress port 22: Connection timed out
这是我在终端运行文件时收到的错误:
./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。
这是文件:
#!/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
我不知道下一步该怎么做。我试了很多方法,但都没有用。是我的代码吗?任何帮助我都会很感激。