From Fedora Project Wiki
No edit summary |
(Change recommended integrity check tool to a modern SHA512-based one.) |
||
(One intermediate revision by one other user not shown) | |||
Line 7: | Line 7: | ||
# On the remote host {{command|<remote_host_ip>}}: | # On the remote host {{command|<remote_host_ip>}}: | ||
## Log-in as root. | ## Log-in as root. | ||
## Start SSHD service: {{command | | ## Start SSHD service: {{command | systemctl start sshd }} | ||
## Add a user <testuser>: {{command| useradd <testuser> }} | ## Add a user <testuser>: {{command| useradd <testuser> }} | ||
## Set a password for <testuser>: {{command| passwd <testuser>}} | ## Set a password for <testuser>: {{command| passwd <testuser>}} | ||
Line 19: | Line 19: | ||
# All operations should work. | # All operations should work. | ||
# The size of test file on remote machine should match local one. | # The size of test file on remote machine should match local one. | ||
# Double check test file integrity with {{command| | # Double check test file integrity with {{command|sha512sum }} | ||
}} | }} | ||
[[Category:Package_openssh_test_cases]] | [[Category:Package_openssh_test_cases]] | ||
[[Category:Security Lab]] | [[Category:Security Lab]] |
Latest revision as of 09:54, 2 July 2024
Description
This test case tests OpenSSH basic functionalities (ssh login, scp files).
Setup
- Ensure that
openssh
,openssh-clients
,openssh-server
packages are installed. - Ensure that SSH port (22/tcp) is open in the firewall.
How to test
- On the remote host
<remote_host_ip>
:- Log-in as root.
- Start SSHD service:
systemctl start sshd
- Add a user <testuser>:
useradd <testuser>
- Set a password for <testuser>:
passwd <testuser>
- On your local host:
- Create 10M test file:
dd if=/dev/urandom of=/tmp/testfile bs=1M count=10
- Copy the file over SSH:
scp /tmp/testfile <testuser>@<remote_host_ip>:/tmp/
- Log-in over SSH with <testuser>:
ssh <testuser>@<remote_host_ip>
- Check for the test file:
file /tmp/testfile
- Check for the size of the test file:
du /tmp/testfile
- Create 10M test file:
Expected Results
- All operations should work.
- The size of test file on remote machine should match local one.
- Double check test file integrity with
sha512sum