Hi guys I have been searching for the solution and while it is probably something obvious it is escaping me.
I am trying to use rake to run some tasks over ssh via the system command but it doesn’t recognize my .ssh/config file.
For example:
task :my_task
system("ssh myserver 'command on myserver'")
end
This gives me the error:
ssh: Could not resolve hostname myserver: Name or service not known
When I run the command from the command line outside of rake it runs fine.
It also works when tested in irb:
system "ssh myserver 'command on myserver'"
Any ideas on what (probably completely obvious thing) I am missing with rake?
sshis really ornery and will ignore things it doesn’t think are “secure enough”, so you may have a valid file but invalid permissions.A quick fix is usually: