Git Product home page Git Product logo

ssh2-python3's People

Contributors

agebert avatar alamaison avatar bagder avatar biot avatar castaglia avatar craigberry avatar dfandrich avatar dottedmag avatar doublex avatar gitpeut avatar gknauf avatar jakob avatar jas4711 avatar kdart avatar kdart-brt avatar kdudka avatar mback2k avatar michaelbuckley avatar monnerat avatar pipo avatar pkittenis avatar salva avatar sbredahl avatar tsengjun avatar ueno avatar vszakats avatar willco007 avatar wootpthomas avatar yodaldevoid avatar zenju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ssh2-python3's Issues

Preferred Mac

Can you prove de an example of specifying preferred mac(s)?

Thanks

Support for no auth?

I am interested and swapping out paramiko as base ssh driver. Can you provide an example of building an unauthenicated connection. Similar to below paramiko snip.

class SSHClient_noauth(SSHClient):

def _auth(self, username, *args):
    self._transport.auth_none(username)
    return

Question about "segfault during garbage collection"

Hi, I see on the README that this fork of ssh2-python is supposed to fix "a segfault during garbage collection in certain situations". I may be encountering this. Could you provide any more information about this issue? Here is what I am seeing with ssh2-python 0.22.0:

Thread 144 "python3" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffef7e96700 (LWP 8370)]
0x0000000000000000 in ?? ()
(gdb) wher
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff2bbf91b in _libssh2_channel_free () from /opt/aeva/py3env/lib/python3.6/site-packages/ssh2/../ssh2_python.libs/libssh2-55f304ca.so.1.0.1
#2  0x00007ffff2bbfa07 in libssh2_channel_free () from /opt/aeva/py3env/lib/python3.6/site-packages/ssh2/../ssh2_python.libs/libssh2-55f304ca.so.1.0.1
#3  0x00007ffff154386d in __pyx_pf_4ssh2_7channel_7Channel_2__dealloc__ (__pyx_v_self=0x7ffef96c3c88) at ssh2/channel.c:1575
#4  __pyx_pw_4ssh2_7channel_7Channel_3__dealloc__ (__pyx_v_self=<ssh2.channel.Channel at remote 0x7ffef96c3c88>) at ssh2/channel.c:1547
#5  __pyx_tp_dealloc_4ssh2_7channel_Channel (o=<ssh2.channel.Channel at remote 0x7ffef96c3c88>) at ssh2/channel.c:7775
#6  0x0000000000576737 in frame_tp_clear.lto_priv () at ../Objects/frameobject.c:548
#7  0x00000000005a3c0e in delete_garbage (old=<optimized out>, collectable=<optimized out>) at ../Modules/gcmodule.c:864

and so on. Could this be the same bug you reference?

Interactive shell not working

Directions

Please provide an example using interactive shell with multiple write/reads.
Channel execute works once. Additional open_sessions raised an error.

Interactive is not working ie .shell()

Solid examples working example would really be helpful.

Thanks

Bug reports

Steps to reproduce:

Python 3.7

Expected behaviour: [What was expected to happen.]
Interactive does not work.

Actual behaviour: [What actually happened.]
ssh2.exceptions.SocketDisconnectError

Additional info: [Include version of libssh2 and any other relevant information.]
ssh2-python3==1.10.2

installation failed

$ docker run --rm -it public.ecr.aws/sam/build-python3.10:latest-x86_64 bash
bash-4.2# pip install ssh2-python3
Collecting ssh2-python3
  Downloading ssh2-python3-1.11.1.tar.gz (613 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 613.6/613.6 kB 2.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-wlztxhc4/ssh2-python3_8e5bb10e4a3f469488c4fdbe80b612ed/setup.py", line 8, in <module>
          from Cython.Distutils.extension import Extension
      ModuleNotFoundError: No module named 'Cython'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

[notice] A new release of pip is available: 23.0.1 -> 23.2
[notice] To update, run: pip install --upgrade pip

After manual installation of Cython there is another error

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ilibssh2/include -I/var/lang/include/python3.10 -c ssh2/knownhost.c -o build/temp.linux-x86_64-cpython-310/ssh2/knownhost.o -O3
      gcc -pthread -shared -Wl,-rpath=/var/lang/lib build/temp.linux-x86_64-cpython-310/ssh2/knownhost.o -L/tmp/pip-install-qq19ux6x/ssh2-python3_2e993007002f46589797c2c73a8da3b4/build/glibc2.26/src -L/var/lang/lib -lssh2 -lssl -lcrypto -lz -o build/lib.linux-x86_64-cpython-310/ssh2/knownhost.cpython-310-x86_64-linux-gnu.so
      /usr/bin/ld: cannot find -lssh2
      /usr/bin/ld: cannot find -lssl
      /usr/bin/ld: cannot find -lcrypto
      collect2: error: ld returned 1 exit status

So I had to manually install libssh2-devel and openssl-devel to make it working.

I believe all of this happens because there are no pre-built binaries for Amazon Linux.
So I'm wondering where it's possible to add distributions with pre-built binaries.


Even after successful installation it still doesn't work

ImportError: /var/lang/lib/python3.10/site-packages/ssh2/session.cpython-310-x86_64-linux-gnu.so: undefined symbol: libssh2_userauth_publickey_frommemory
bash-4.2# nm -D /lib64/libssh2.so.1 | grep libssh2_userauth_publickey_frommemory
bash-4.2# nm -D /lib64/libssh2.so.1 | grep libssh2_userauth_publickey
0000000000019e90 T libssh2_userauth_publickey
0000000000019cf0 T libssh2_userauth_publickey_fromfile_ex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.