diff --git a/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch b/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch
index 4803ff81d8..451ac1a12a 100644
--- a/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch
+++ b/meta-oe/recipes-support/libssh/libssh/0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch
@@ -10,22 +10,20 @@ Upstream-Status: Inappropriate [embedded specific]
 
 Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
 ---
- tests/CMakeLists.txt | 2 ++
+ tests/CMakeLists.txt |    2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
-index 89b95d08..e481534c 100644
 --- a/tests/CMakeLists.txt
 +++ b/tests/CMakeLists.txt
-@@ -96,6 +96,7 @@ set(TEST_TARGET_LIBRARIES
+@@ -138,6 +138,7 @@
  
  add_subdirectory(unittests)
  
 +if (CLIENT_TESTING OR SERVER_TESTING)
  # OpenSSH Capabilities are required for all unit tests
  find_program(SSH_EXECUTABLE NAMES ssh)
- if (SSH_EXECUTABLE)
-@@ -345,6 +346,7 @@ endif (WITH_PKCS11_URI)
+ find_program(SSH_KEYGEN_EXECUTABLE NAMES ssh-keygen)
+@@ -440,6 +441,7 @@
  file(COPY gss/kdcsetup.sh DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/gss FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE)
  
  message(STATUS "TORTURE_ENVIRONMENT=${TORTURE_ENVIRONMENT}")
@@ -33,6 +31,3 @@ index 89b95d08..e481534c 100644
  
  configure_file(tests_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/tests_config.h)
  
--- 
-2.25.1
-
diff --git a/meta-oe/recipes-support/libssh/libssh_0.11.5.bb b/meta-oe/recipes-support/libssh/libssh_0.12.2.bb
similarity index 94%
rename from meta-oe/recipes-support/libssh/libssh_0.11.5.bb
rename to meta-oe/recipes-support/libssh/libssh_0.12.2.bb
index d2f5072d1e..7126559901 100644
--- a/meta-oe/recipes-support/libssh/libssh_0.11.5.bb
+++ b/meta-oe/recipes-support/libssh/libssh_0.12.2.bb
@@ -6,14 +6,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=dabb4958b830e5df11d2b0ed8ea255a0"
 
 DEPENDS = "zlib openssl"
 
-SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.11;tag=${BPN}-${PV} \
+SRC_URI = "git://git.libssh.org/projects/libssh.git;protocol=https;branch=stable-0.12;tag=${BPN}-${PV} \
            file://0001-tests-CMakeLists.txt-do-not-search-ssh-sshd-commands.patch \
            file://run-ptest \
           "
 
 SRC_URI:append:toolchain-clang = " file://0001-CompilerChecks.cmake-drop-Wunused-variable-flag.patch"
 
-SRCREV = "a09fdd00416e53b6ed436df6ff14339a4f884601"
+SRCREV = "07430deb9b97b751ec5ea5a7fc307f40bf042e0a"
 
 CVE_PRODUCT = "libssh:libssh"
 
