Task List:
Check that any SSH services are installed on the remote Linux machine
1
dpkg -l | grep ssh
Check for the correct cervice name
Run the following command to list all available services related to SSH:1
systemctl list-units --type=service | grep ssh
You might see service names like:
- ssh.service
- sshd.service
- openssh-server.service
Check that
openssh-server
is installed1
sudo apt-get install openssh-server
Verify the installed
openssh-server
configuration1
sudo systemctl status sshd
Check secure SSH access via the configuration file
1
sudo nano /etc/ssh/sshd_config
Confirm that
openssh-server
is running1
sudo systemctl start sshd && sudo systemctl enable sshd
Test SSH connection from a remote system
1
ssh username@<remote_machine_ip>
Transfer files using SSH from
<local_machine>
to<remote_machine>
1
scp /path/to/local/file username@<remote_machine_ip>:/path/to/remote/destination
Additional Commands:
Restart the SSH service after making configuration changes
1
sudo systemctl restart sshd
Check the active SSH sessions on the remote machine
1
who | grep ssh
Allow only key-based authentication for SSH connections
1
2
3
4sudo nano /etc/ssh/sshd_config
# Change the following:
# PasswordAuthentication no
# PermitRootLogin noMonitor SSH access logs
1
sudo tail -f /var/log/auth.log
Put the syste to suspend, by
power management
(aliaspm
):1
sudo pm-suspend
Put the syste to suspend by
systemctl
:1
sudo systemctl suspend