Disconnect from ssh2_connect()

痞子三分冷 提交于 2019-12-03 22:43:02

Just unset($connection) your connection variable or ssh2_exec($connection, 'exit'); might do it.

You could probably do the following in order to be even more convincing!

ssh2_exec($connection, 'exit');
unset($connection);

If you were using phpseclib, a pure PHP SSH implementation, you could do $ssh->disconnect(). phpseclib's destructor calls it but you could call it manually as well.

Flask

ssh2_exec('logout') should kill your session…

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!