{"record":{"id":"68e75ceb0b9e9178","repo":"hashicorp/vagrant","slug":"the-ssh-executable-found-in-the-path-is-a-putty","errorCode":null,"errorMessage":"The `ssh` executable found in the PATH is a PuTTY Link SSH client.\nVagrant is only compatible with OpenSSH SSH clients. Please install\nan OpenSSH SSH client or manually SSH in using your existing client\nusing the information below.\n\nHost: %{host}\nPort: %{port}\nUsername: %{username}\nPrivate key: %{key_path}","messagePattern":"The `ssh` executable found in the PATH is a PuTTY Link SSH client\\.\nVagrant is only compatible with OpenSSH SSH clients\\. Please install\nan OpenSSH SSH client or manually SSH in using your existing client\nusing the information below\\.\n\nHost: %(.+?)\nPort: %(.+?)\nUsername: %(.+?)\nPrivate key: %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::SSHIsPuttyLink","httpStatus":null,"severity":"error","filePath":"lib/vagrant/util/ssh.rb","lineNumber":104,"sourceCode":"\n        if !ssh_path\n          if Platform.windows?\n            raise Errors::SSHUnavailableWindows,\n              host: ssh_info[:host],\n              port: ssh_info[:port],\n              username: ssh_info[:username],\n              key_path: ssh_info[:private_key_path].join(\", \")\n          end\n\n          raise Errors::SSHUnavailable\n        end\n\n        if Platform.windows?\n          # On Windows, we need to detect whether SSH is actually \"plink\"\n          # underneath the covers. In this case, we tell the user.\n          r = Subprocess.execute(ssh_path)\n          if r.stdout.include?(\"PuTTY Link\") || r.stdout.include?(\"Plink: command-line connection utility\")\n            raise Errors::SSHIsPuttyLink,\n              host: ssh_info[:host],\n              port: ssh_info[:port],\n              username: ssh_info[:username],\n              key_path: ssh_info[:private_key_path].join(\", \")\n          end\n        end\n\n        # If plain mode is enabled then we don't do any authentication (we don't\n        # set a user or an identity file)\n        plain_mode = opts[:plain_mode]\n\n        options = {}\n        options[:host] = ssh_info[:host]\n        options[:port] = ssh_info[:port]\n        options[:username] = ssh_info[:username]\n        options[:private_key_path] = ssh_info[:private_key_path]\n\n        log_level = ssh_info[:log_level] || \"FATAL\"","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/lib/vagrant/util/ssh.rb#L86-L122","documentation":"On Windows, Vagrant::Util::SSH.exec defensively executes the discovered ssh executable with no arguments and scans stdout for 'PuTTY Link' / 'Plink: command-line connection utility'; if the PATH ssh is actually plink underneath, it raises SSHIsPuttyLink (Vagrant supports OpenSSH clients only) with the connection details for manual use.","triggerScenarios":"`vagrant ssh` on Windows where plink.exe is exposed as ssh — a renamed/copied plink, a shim or wrapper directory (chocolatey shims, custom bin) forwarding ssh to PuTTY's plink — so the detection string appears in the tool's banner output.","commonSituations":"Machines with PuTTY-centric corporate tooling; a bin dir early in PATH shadowing OpenSSH with a plink alias.","solutions":["Remove or rename the plink-as-ssh shim so a real OpenSSH client resolves for `ssh`","Install the Windows OpenSSH Client (or Git for Windows) and ensure it precedes the shim in PATH","Or keep PuTTY and connect manually with the Host/Port/Username/key details the error prints"],"exampleFix":"# before: shim dir shadows the real ssh\n> where ssh\nC:\\Tools\\shims\\ssh.exe        (plink wrapper)\n\n# after\n> ren C:\\Tools\\shims\\ssh.exe ssh-plink.cmd\n> where ssh\nC:\\Windows\\System32\\OpenSSH\\ssh.exe","handlingStrategy":"validation","validationCode":"ssh = Vagrant::Util::Which.which('ssh')\nif ssh\n  banner = `#{ssh} 2>&1`.to_s\n  abort 'ssh resolves to PuTTY plink; install a real OpenSSH client' if banner.include?('PuTTY Link')\nend","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Util::SSH.exec(machine.ssh_info)\nrescue Vagrant::Errors::SSHIsPuttyLink => e\n  warn e.message # manual connection details included\n  system('putty', '-ssh', \"#{machine.ssh_info[:username]}@#{machine.ssh_info[:host]}\", '-P', machine.ssh_info[:port].to_s)\nend","preventionTips":["Audit PATH shims that alias ssh to plink","Standardize hosts on OpenSSH clients","Remember Vagrant's Windows SSH support is OpenSSH-only"],"tags":["ssh","plink","putty","windows","compatibility"],"backgroundTag":"incompatible-ssh-client","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}