0

I found a github gist where someone is compiling rails assets locally and then copying them to the server.

It fails to connect to the server with most likely due to the fact that I changed my ssh port to lets say 90.

How can I make it so this variable connects using port 90?

remote_dir = "#{host.user}@#{host.hostname}:#{shared_path}/public/assets/"

Typically when I connect via ssh to the server i do this:

ssh myUser@myServer -p90

https://gist.github.com/Jesus/80ef0c8db24c6d3a2745

Catfish
  • 18,876
  • 54
  • 209
  • 353

1 Answers1

0

Seems this question has been asked before: Is it possible to specify a different ssh port when using rsync?

The trick was to use:

run_locally { execute "rsync -av -e 'ssh -p 90' --delete #{local_dir} #{remote_dir}" }

instead of

run_locally { execute "rsync -av --delete #{local_dir} #{remote_dir}" }
Community
  • 1
  • 1
Catfish
  • 18,876
  • 54
  • 209
  • 353