ssh_echo
所属分类:Telnet客户端/Shell
开发工具:Elixir
文件大小:0KB
下载次数:0
上传日期:2017-09-20 07:44:50
上 传 者:
sh-1993
说明: 用于测试SSH客户端的简单elixir echo服务器,
(Simple elixir echo server for testing SSH clients,)
文件列表:
LICENSE.md (1057, 2017-09-20)
Makefile (105, 2017-09-20)
config/ (0, 2017-09-20)
config/config.exs (15, 2017-09-20)
coveralls.json (114, 2017-09-20)
lib/ (0, 2017-09-20)
lib/ssh_daemon_channel.ex (460, 2017-09-20)
lib/ssh_echo.ex (872, 2017-09-20)
lib/ssh_echo/ (0, 2017-09-20)
lib/ssh_echo/application.ex (318, 2017-09-20)
lib/ssh_echo/cli.ex (683, 2017-09-20)
lib/ssh_echo/controller.ex (1096, 2017-09-20)
lib/ssh_echo/daemon.ex (533, 2017-09-20)
mix.exs (1168, 2017-09-20)
priv/ (0, 2017-09-20)
priv/certs/ (0, 2017-09-20)
priv/certs/ssh_host_rsa_key (1675, 2017-09-20)
priv/certs/ssh_host_rsa_key.pub (403, 2017-09-20)
test/ (0, 2017-09-20)
test/ssh_echo_test.exs (2122, 2017-09-20)
test/test_helper.exs (15, 2017-09-20)
# SSHEcho
An echo server, to allow basic testing of SSH clients. Currently only supports 'exec' commands, not interactive shells.
To start listening on a port:
iex> SSHEcho.start_daemon 55555, "fred", "secret"
:ok
This will now echo back any 'exec'ed commands to that port:
$ ssh -p 55555 fred@localhost hello
SSH server
Enter password for "fred"
password:
hello
$
Then to stop the daemon:
iex> SSHEcho.stop_daemon 55555
### Custom message handlers
The default echo behaviour can be overridden:
iex> SSHEcho.start_daemon 55555, "fred", "secret", &String.upcase/1
:ok
$ ssh -p 55555 fred@localhost hello
SSH server
Enter password for "fred"
password:
HELLO
$
## Installation
Add `ssh_echo` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:ssh_echo, "~> 0.3"}]
end
```
Documentation can be found at
[https://hexdocs.pm/ssh_echo](https://hexdocs.pm/ssh_echo).
近期下载者:
相关文件:
收藏者: