[Erlang危机](4.3)SSH守护进程
来源:互联网 发布:网络女主播是什么 编辑:程序博客网 时间:2024/06/06 09:07
原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface联系邮箱:cto@188.com
SSH Daemon
Erlang/OTP comes shipped with an SSH implementation that can both act as a server and a client. Part of it is a demo application providing a remote shell working in Erlang.
To get this to work, you usually need to have your keys to have access to SSH stuff remotely in place already, but for quick test purposes, you can get things working by doing:
为了让它工作起来,你通常需要把你的SSH在远程服务器上部署好。但因为我们只是做实验,就可以像下面这样子做:
-----------------------------------------------------------------------------------$ mkdir /tmp/ssh
$ ssh-keygen -t rsa -f /tmp/ssh/ssh_host_rsa_key
$ ssh-keygen -t rsa1 -f /tmp/ssh/ssh_host_key
$ ssh-keygen -t dsa -f /tmp/ssh/ssh_host_dsa_key
$ erl
1> application:ensure_all_started(ssh).
{ok,[crypto,asn1,public_key,ssh]}
2> ssh:daemon(8989, [{system_dir, "/tmp/ssh"},
2> {user_dir, "/home/ferd/.ssh"}]).
{ok,<0.52.0>}
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------$ ssh -p 8989 ferd@127.0.0.1
Eshell Vx.x.x (abort with ^G)
1>
-----------------------------------------------------------------------------------
And with this you can interact with an Erlang installation without having it installed on the current machine. Just disconnecting from the SSH session (closing the terminal) will be enough to leave. Do not run functions such as q() or init:stop() , which will terminate the remote host. 4
If you have trouble connecting, you can add the -oLogLevel=DEBUG option to ssh to get debug output.
如果无法连接SSH成功,可以为SSH加一个选项 -oLogLevel=DEBUG, 然后输出debug信息。[3] Complete instructions with all options to get this set up are available athttp://www.erlang.org/doc/man/ssh.html#daemon-3.
[4] This is true for all methods of interacting with a remote Erlang node.
[注4]:这种命令对所有连接远程Erlang节点的方法都不要用!
- [Erlang危机](4.3)SSH守护进程
- [Erlang危机](5.1.3)进程
- [Erlang危机](3.4)习题
- [Erlang危机](4.2)Remsh
- [Erlang危机](2.0)创建erlang开源程序
- 多核危机:Scala vs. Erlang
- 多核危机:Scala vs Erlang
- [Erlang危机](1.3)OTP应用
- [Erlang危机](2.1)项目结构
- [Erlang危机](3.0)过载处理
- [Erlang危机](3.2)限制输入
- [Erlang危机](4.4)命名管道
- [Erlang危机](5.1.1)内存
- [Erlang危机](5.1.2)CPU
- OpenSSH SSH 服务器守护进程配置文件sshd_config详解
- 守护进程守护自身
- 守护线程、守护进程
- 守护进程
- poj2082 stack
- Android 自定义菜单示例
- 第十一周项目一(2)
- linux下 WMB通过ODBC连接数据库
- ora.LISTENER.lsnr INTERMEDIATE 处理一例
- [Erlang危机](4.3)SSH守护进程
- java基础学习-克隆
- [软工视频]面向对象
- QT常见错误之GLU头文件没法使用
- uboot 分析之 启动流程
- thinkpadE440 U盘安装mac10.9.4 Gpt分区+Clover+UEFI引导成功记录
- 每天学习一点c++之四——运算符重载
- 单例模式-->学习笔记
- flush