When trying to apply a patch I am getting this error-

 ssh PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh
ssh: Could not resolve hostname PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11- 
6-06.sh: Name or service not known

When I do ls I can see the patch. I have double and triple checked it is spell correct, and I have all permissions. What does name or service not known mean?


As stated you are using the wrong command. 'SSH' is a command for starting new ssh sessions with a remote host.


ssh username@

'Could not resolve hostname' and 'Name or service not known' errors are just stating that there is no host responding to this command as there is no host with the name of your patch.

'SH' is what i have used to run these commands. Use either of the below to run patches and they should run successfully (i normally run ssh terminals in bin/sh shell):

sh PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh



Also see here for more information from Magento Dev Docs on applying patches:



The command is bash, not ssh. So in the end:

bash PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh

Ref: https://support.hypernode.com/knowledgebase/how-to-apply-magento-patches/#Step_4_Apply_the_patch

  • When I ran it with bash (which seems correct, thank you) I now get this-PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 7: $'\r': command not found PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 9: syntax error near unexpected token $'{\r'' 'ATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh: line 9: _check_installed_tools() {
    – tjjen
    Jul 26 '17 at 3:05
  • Did you read this? magento.stackexchange.com/questions/176871/…
    – PY Yick
    Jul 26 '17 at 3:08
  • Yup, I have ran and tested this on my dev server and gone through and created all the new files that require formkeys. I had no issues.
    – tjjen
    Jul 26 '17 at 3:11
  • You can check if the patches are installed successfully before (not 9767) by grep "|" app/etc/applied.patches.list
    – PY Yick
    Jul 26 '17 at 3:14
  • They were. Here is what I think my issue might be- stackoverflow.com/questions/21465771/… This sounds like what I am dealing with. I downloaded in chrome on a mac. So I opened it with Sublime just now and and under view-line endings-unix made sure that was checked and not windows. Still no good.
    – tjjen
    Jul 26 '17 at 3:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.