0

I often use this command to connect to another server with x forwarding:

[myuser@server1]$: ssh -Y 10.32.45.123 (10.32.45.123 is server2)

[email protected]'s password:

[$myuser@server2]:$

I need an alias which will ssh to server2 with -Y option, and also enter my password for me.

How do I do it?

Best Regards

2
  • 2
    Carry out ssh-keygen -t rsa accept defaults. Copy that file to using ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]then you can use ssh -Y '[email protected]'. Use this if you need more help. (Although its from Debian, it applies to all Linux flavours). Hope this helps.
    – user112665
    Mar 28, 2012 at 16:56
  • Also, while aliases are good with only a few servers, ssh config file is a bit better for a larger environment, and a few other neat tricks in the comments on this page: howtogeek.com/75007/…
    – Rob
    Mar 28, 2012 at 17:08

0

You must log in to answer this question.

Browse other questions tagged .