SSH and SCP in Windows-Hypervisor



  • Hi Guys,

    I am learning development with QT and have started my first project. I am running a Hypervisor based Windows OS with QT5 on it. What I want to do is when I click a button, I want to copy my linux script over to the linux side with its ip 192.168.0.200 and then ssh into root and execute the script.

    Now, the problems that I am facing is, I have my GUI and application set up, but when I try to run the SCP and SSH command using system() it gives me the following error:

    FOR SSH: I am ruuning system("PATH=%some path that I want to set% && ssh -T -o StrictHostKeyChecking=no root@192.168.0.200");
    Its giving me: Warning: Permanently added '192.168.0.200' (RSA) to the list of known hosts
    Permission denied, please try again
    Permission denied, please try again
    permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

    FOR SCP: I am running system("PATH=%some path that I want to set% && scp -o StrictHostKeyChecking=no cygdrive/c/somepath root@192.168.0.200:/tmp/");
    Its giving me: Could not create directory '/home/user/.ssh'
    Failed to add the host to the list of known hosts
    permission denied, please try again
    permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)
    lost connection

    I have been trying to find a solution since long. Would be really glad if someone could help me out.

    Thank you in advance.

    --
    Akash


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Not really a Qt topic, you should first ensure that your ssh client and server are properly configured



  • Hi Guys,

    So there has been some development from yesterday. The errors still exist but comes up in the IDE console. When I go to build and do qmake and run the .exe file, it opens up my app, cmd and prompts me for password. So it works that way, which is weird.

    I wouldn't care about the problem in IDE console if what I mentioned above means that I am good to release my .exe file. Please let me know if I am missing something, cause if something fails, it should fail on the .exe too right?

    Thanks in advance.

    --
    Akash


  • Lifetime Qt Champion

    Can you share your code ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.