Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)

myuser@10.32.45.123'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

share|improve this question
2  
Carry out ssh-keygen -t rsa accept defaults. Copy that file to using ssh-copy-id -i ~/.ssh/id_rsa.pub myuser@10.32.45.123then you can use ssh -Y 'myuser@10.32.45.123'. Use this if you need more help. (Although its from Debian, it applies to all Linux flavours). Hope this helps. – user112665 Mar 28 '12 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 '12 at 17:08

You must log in to answer this question.

Browse other questions tagged .