0

I'm trying to create ConEmu task in Cmder, I want to navigate to particular directory and run a SSH command and using git-bash for this. I'm able to change directory but can't run the SSH command.

Command

*cmd /c "%ConEmuDir%\..\git-for-windows\bin\bash" --login -i  -new_console:d:E:\Project\SSHKeys && ssh -i "secret.pem" ubuntu@ip_address

Error

'C:\cmder\vendor\conemu-maximus5\..\git-for-windows\bin\bash" --login -i && ssh -i "secret.pem' is not recognized as an internal or external command, operable program or batch file.

0

1 Answer 1

0

You have several problems here

  1. You are SSH-ing to remote server, it doesn't care on your local directory. Why do you want that?

  2. You don't need cmd.exe to run bash command. Don't add spare layers of processed. They have no sense.

  3. Even if you need to run something via cmd /c ... you have to learn how cmd does unquoting. You have to add one more double quote around your command line cmd /c ""something" ... & ..."

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.