Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Simple SSH Mock Server for E2E testing purposes, e.g. with Testcontainers.
pip install ssh-mock
# Create commands.yml first
# Start Mock
ssh-mock
See docker-compose.yml or run:
# Create commands.yml first
# Run Mock Server:
docker run --rm -p 5050:5050 -v ./commands.yml:/usr/src/app/commands.yml ghcr.io/danielhabenicht/mock-ssh:0.2.2
# Try it out
ssh localhost -p 5050
exec echo Hello World!
version: "3.7"
commands:
# Simple command
- command: echo hello
stdout: "Hello World!"
returncode: 0
# Command matching regex
- command: interface.*
stdout: ""
# Return values from command via JINJA template
- command: exec echo.*
stdout_template: "{{command[9:]|trim|trim('''')|trim('\"')}}"
returncode: 0
# Modify the Hostname
- command: enable
stdout: "Password"
modify_host: HOST#
returncode: 0
# Use multiple lines
- command: show users
stdout: " Line User Host(s) Idle Location\n* 1 vty 0 rootuser idle 00:00:00\n example.test.de\n\n Interface User Mode Idle Peer Address\n\n"
returncode: 0
- command: show interfaces description
stdout: |
Interface Status Protocol Description
Vl1 up up
Vl308 up up
Gi1/0/1 up up Access Port
Gi1/0/12 down down Access Port
Gi1/1/1 down down
Gi1/1/2 down down
Te1/1/3 down down
Te1/1/4 up up
This was initally a fork of https://github.com/d1618033/fake-ssh. Thanks David for your work!
FAQs
Mocks an SSH Server
We found that ssh-mock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.