0
I made an alias to make it easier to connect to my AWS EC2 instance. Although there is an error. Here is the code in ~/.bash_profile
:
alias aws_connect=‘ssh -i /path/to/keyfile.pem ec2-user@xx.xxx.xxx.xxx’
When I type "aws_connect in the terminal, this is what comes out: -bash: “ssh: command not found
. This is the output when I type source ~/.bash_profile
:
MacBook-Pro:~ username$ source ~/.bash_profile
-bash: alias: -i: not found
-bash: alias: /path/to/keyfile.pem: not found
-bash: alias: ec2-user@xx.xxx.xxx.xxx”: not found
Can anyone see what I did wrong?
1Is that a cut and paste? If so, the quote marks are wrong - they should be
'
not‘’
– Paul – 2014-08-19T05:59:22.180That worked. OS X automatically makes
'
into‘’
. – Isserlis – 2014-08-19T18:20:01.980