使用paramiko模块,Invalid call with 3 args: 'chrootsh' '-c' 'ls'

新手上路,请多包涵

问题描述

使用paramiko模块登陆服务器执行命令报错Invalid call with 3 args: 'chrootsh' '-c' 'ls'

相关代码

cmd = 'ls'
stdin, stdout, stderr = client.exec_command( cmd ) 
print( stderr.read().decode( 'utf-8' ))

你期待的结果是什么?实际看到的错误信息又是什么?

报错
Invalid call with 3 args: 'chrootsh' '-c' 'ls '

这是为什么呢,是系统不支持吗?还是权限问题?登陆使用的不是root帐号

阅读 1k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题