1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-19 02:42:15 +00:00
mailinabox/test/test_ssh.py
2017-02-02 15:41:52 +01:00

14 lines
290 B
Python

import pytest
from settings import *
def test_ssh_banner():
"""SSH is responding with its banner"""
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((TEST_SERVER, TEST_PORT))
data = s.recv(1024)
s.close()
assert data.startswith("SSH-2.0-OpenSSH")