Forum > Other
How to connect to a PC via SSH? (Is it possible?)
dotniet:
Hi.
I need to work (run/edit/delete files) with 12 Linux computer nodes in a cluster. Usually I use SSH to connect to those nodes.
How can I do this from Lazarus?
______________________
I am new to Lazarus but I have good experience with Delphi.
Thanks
:)
Vincent Snijders:
You can use TProcess that calls plink.exe or ssh. See the input/output example of http://wiki.lazarus.freepascal.org/Executing_External_Programs#Using_input_and_output_of_a_TProcess
dotniet:
PLink is for Windows. I am running on Linux.
I have tried to run the 'ssh' command via TProcess (see the example here: https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/examples/process) but it is not working. I mean it launches the SSH, then it asks for password and then nothing happens. TProcess returns no output from SSH.
Vincent Snijders:
IIRC, when I wrote the example, I used passwordless connections, using a private key file.
Marc:
ssh doesn't ask for a password through a "virtual" console like a pipe, but it wants a real console.
google on ssh-askpass, maybe it helps
Navigation
[0] Message Index
[#] Next page