Bundle to use SSH2 PHP extension with Symfony2
steevanb / ssh2bundle Goto Github PK
View Code? Open in Web Editor NEWUse SSH2 PHP extension with Symfony2
Use SSH2 PHP extension with Symfony2
Bundle to use SSH2 PHP extension with Symfony2
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?
Using Symfony 3.3
Isn't this bundle for SFTP connections?
Using entities Profile and Connection.
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!
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 :/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.