Skip to content

SCPException Protocol not available while getting from Windows #132

@sankalpanand

Description

@sankalpanand

I'm trying to get a file from Windows 10 with OpenSSH running to my Macbook. I'm getting the following error whereas the same command works fine on my terminal.

This works fine -
scp labuser@172.28.131.71:C:/Users/labuser/ScreenCaptureUtil/Screenshots/Thanos.png /Users/skynet/Downloads/Temporary/

This doesn't work -

ssh = createSSHClient(my_ip, 22, "labuser", "P@ssword1")
scp = SCPClient(ssh.get_transport())
scp.get(r"C:\Users\labuser\ScreenCaptureUtil\Screenshots\Thanos.png", r"/Users/skynet/Downloads/Temporary")

Gives me the exception-

Traceback (most recent call last):
  File "/Users/skynet/Documents/code/ScratchPad/Paramiko.py", line 14, in <module>
    scp.get(r"C:\Users\labuser\ScreenCaptureUtil\Screenshots\Thanos.png", r"/Users/skynet/Downloads/Temporary")
  File "/Users/skynet/.virtualenvs/venv_e2e_python3/lib/python3.7/site-packages/scp.py", line 238, in get
    self._recv_all()
  File "/Users/skynet/.virtualenvs/venv_e2e_python3/lib/python3.7/site-packages/scp.py", line 388, in _recv_all
    raise SCPException(asunicode(msg[1:]))
scp.SCPException: scp: 'C:/Users/labuser/ScreenCaptureUtil/Screenshots/Thanos.png': Protocol not available

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions