2

I want to link the ssh command to autossh command, so for example when I type ssh user@example.com it will execute autossh user@example.com.

I was tried ln -s autossh ssh but it doesn't work.

2

The command you are looking for is alias.

The general syntax for the alias command varies somewhat according to the shell. In the case of the bash shell (or any sh-like shell) it is

alias [-p] [name="value"]

So it seems you want:

alias ssh="autossh"
2
  • There is no need for the space (and it means alias the next word also).
    – ImHere
    Jan 2 '18 at 2:47
  • It was a typo I'm on cellphone
    – vfbsilva
    Jan 2 '18 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.