Giter VIP home page Giter VIP logo

ssh2bundle's Introduction

ssh2bundle's People

Contributors

steevanb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ssh2bundle's Issues

adding public key

Hi,

I try to use your bundle and I can connect into my ssh server and also create files inside and so on, but I can't echo my authorized_key with the exec command.

Any idea of how can I do it?

copying authorized_keys on /root/.ssh/ directory

Hi,

I already have working when a user let his public key on the remote server authorized_keys file.

But as Debian and last Ubuntu versions as far as I know they don't let you authenticate with root user, I'd like to know if you see it possible to do with your library.

1.- Access remote server with user (Working)
2.- Send a command with sudo (sudo touch /root/.ssh/authorized_keys)
3.- Get the server answer ( (user) Password:)
4.- Send the sudo password

I mean something like that.

'''

login('username', 'password')) { exit('Login Failed'); } echo $ssh->read('username@username:~$'); $ssh->write("passwd\n"); echo $ssh->read('(current) UNIX password:'); $ssh->write("oldpassword\n"); echo $ssh->read('New UNIX password:'); $ssh->write("newpassword\n"); echo $ssh->read('Retype new UNIX password:'); $ssh->write("newpassword\n"); echo $ssh->read('passwd: all authentication tokens updated successfully.'); ``` ?>

'''

is not my code:
http://stackoverflow.com/questions/10116886/changing-password-of-unix-remote-server-through-php-ssh

Thanks!

Multiple commands

Hi,
How to execute multiple commands?
i've have to make configuration on cisco device and in first command I've must execute "configure terminal" and next execute more commands.

	    $conState = $connection->getState();
	    dump($conState);
	    $listing = $connection->exec('do show int status');

this throws error
Warning: ssh2_exec(): Unable to request a channel from remote host
dump shows that connection is established.

and there is no disconnect() method :/

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.