Paramiko引发“SFTPError:垃圾包已接收”

2024-05-20 01:06:38 发布

您现在位置:Python中文网/ 问答频道 /正文

以下代码:

    t = paramiko.Transport((hostname, port))
    t.connect(username=username, password=password)
    sftp = t.open_sftp_client()

引发此异常:

^{pr2}$

我的主机的ip是147.214.16.150,我使用这个命令在控制台中测试:

esekilvxen245 [11:03am] [/home/elqstux] -> sftp 147.214.16.150
Connecting to 147.214.16.150...

These computer resources, specifically Internet access and E-mail, are
provided for authorized users only. For legal, security and cost
reasons, utilization and access of resources are monitored and recorded
in log files. All information (whether business or personal) that is
created, received, downloaded, stored, sent or otherwise processed can
be accessed, reviewed, copied, recorded or deleted by Ericsson, in
accordance with approved internal procedures, at any time if deemed
necessary or appropriate, and without advance notice. Any evidence of
unauthorized access or misuse of Ericsson resources may result in
disciplinary actions, including termination of employment or assignment,
and could subject a user to criminal prosecution. Your use of Ericsson's
computer resources constitutes your consent to Ericsson's Policies and
Directives, including the provisions stated above.

IF YOU ARE NOT AN AUTHORIZED USER, PLEASE EXIT IMMEDIATELY

Enter Windows Password: 
Received message too long 1131770482

Tags: orandoftoinaccessusernamepassword
2条回答

我有一个类似的问题,发现这是由于一个程序的输出'gvm'。 我通过更改.bashrc文件修复了它:

#THIS MUST BE AT THE END OF THE FILE FOR GVM TO WORK!!!
#[[ -s "/home/micron/.gvm/bin/gvm-init.sh" ]] && source "/home/micron/.gvm/bin/gvm-init.sh" <== commented this out.

相关问题 更多 >