0

There is a VM ubuntu server I am using which is named vm.

I used to remotely log into it through SSH public key.

But now I need to use ssh to other servers FROM vm, ex. pushing to heroku.

There is an unexpected results for that:

  1. When use my local console to remote control vm, use ssh push won't succeed, it complains about failed publickey.
  2. However, when I use the vm directly (from the linux terminal), I could push with ssh without error.

My first thought would be some mis-configuration of the ssh key forwarding, any clues for me to solve this problem?

steveyang
  • 623
  • 4
  • 9
  • 15

1 Answers1

0

You need to forward your SSH key when you connect to the machine VM :

ssh -A user@VM
Blueicefield
  • 232
  • 1
  • 3
  • Why should I enable key forwarding? – steveyang Mar 06 '12 at 16:49
  • If you have the ssh key on your machine you have to use the forwarding. If there is only a password authentification on heroku thé you have to disable the forwarding with the option -a. And If you need a ssh key on VM you have to use the option -i /path/to/your.key. – Blueicefield Mar 06 '12 at 22:01