Quote:
Originally Posted by
pratapsingh
Hello Corona,
Thanks for your reply but I think you did'nt check the first post of this thread where I had already mentioned it, I am storing all the password and details in a database and fetching it from there
I know how you're trying to accomplish the solution, yes. But things like su, sudo, ssh, scp, and sftp are all
designed to stop you from doing this. That's why strange contortions and imported libraries are needed to do it at all: You need to create a convincing enough virtual terminal to fool ssh into thinking it's an interactive user...
Quote:
Regarding using ssh keygen, I have dynamic updates on my database of system details so every time I can not create ssh-keygen and keep it and that is not secure too if you are not the only one accessing the remote system from your system
You may have spent a lot of time painting yourself into a corner building a password database instead of using ssh's built-in security features, then. And, no. You can't get the key from the remote host.
Quote:
...and any one can access the remote system.
Nope. You can't get the keys from the remote host, and you can only login with the keys if you have access to the keys.