summaryrefslogtreecommitdiff
path: root/deskutils/kdeconnect-kde/files/patch-plugins_sftp_mounter.cpp
blob: 5554b24703e9bfe81167b0014939886f886c1ee7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- plugins/sftp/mounter.cpp.orig	2023-12-18 22:14:59 UTC
+++ plugins/sftp/mounter.cpp
@@ -128,7 +128,7 @@ void Mounter::onPacketReceived(const NetworkPacket &np
                       << QStringLiteral("-o") << QStringLiteral("gid=") + QString::number(getgid())
                       << QStringLiteral("-o") << QStringLiteral("reconnect")
                       << QStringLiteral("-o") << QStringLiteral("ServerAliveInterval=30")
-                      << QStringLiteral("-o") << QStringLiteral("password_stdin");
+                      << QStringLiteral("-o") << QStringLiteral("ssh_command=sshpass -p %1 %2").arg(np.get<QString>(QStringLiteral("password")), QStringLiteral("ssh"));
     // clang-format on
 
     m_proc->setProgram(program, arguments);
@@ -137,8 +137,8 @@ void Mounter::onPacketReceived(const NetworkPacket &np
     m_proc->start();
 
     // qCDebug(KDECONNECT_PLUGIN_SFTP) << "Passing password: " << np.get<QString>("password").toLatin1();
-    m_proc->write(np.get<QString>(QStringLiteral("password")).toLatin1());
-    m_proc->write("\n");
+    //m_proc->write(np.get<QString>(QStringLiteral("password")).toLatin1());
+    //m_proc->write("\n");
 }
 
 void Mounter::onStarted()