Testcase OpenSSH
From Hamara Wiki
Contents
Description
This test case tests OpenSSH basic functionalities (ssh login, scpfiles).
Setup
- Ensure that openssh-server,openssh-clients packages are installed.
- Ensure that SSH port (22/tcp) is open in the firewall.
How to testOn the remote host<remote_host_ip>:
1. Log-in as root. 1. Start SSHD service: service sshd start 1. Add a user <testuser>: useradd <testuser> 1. Set a password for <testuser>: passwd <testuser>
On your local host:
1. Create 10M test file: dd if=/dev/urandom of=/tmp/testfile bs=1M count=10 1. Copy the file over SSH: scp /tmp/testfile <testuser>@<remote_host_ip>:/tmp/ 1. Log-in over SSH with <testuser>: ssh <testuser>@<remote_host_ip> 1. Check for the test file: file /tmp/testfile 1. Check for the size of the test file: du /tmp/testfile
Expected Results
1. All operations should work. 1. The size of test file on remote machine should match local one. 1. Double check test file integrity with md5sum