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 want to shorten my SSH login from my Mac computer to remote computer. Currently, I log in with


I tried to replace the command using a short name in the cshrc file, but it did not work. How can I log in to the remote computer without having to type the full command above?

share|improve this question

You can add a config file (no file extension) to your .ssh folder with the following entry:

Host x
User me
IdentityFile ~/.ssh/key

Now, you can log in to with the username me and private key key with the following command:

ssh x
share|improve this answer
Thanks a lot !!!!!This works but need to password . would you please inform me how can make it password free? – skn Mar 11 '12 at 3:01
Oh. You did not mention using a password, so I assumed you used a key. It's a bit more difficult to pass a plain-text password with SSH. This question on AskUbuntu has a couple of solutions:… – iglvzx Mar 11 '12 at 3:10
Why don't you set up public-key authentication? It's easier and more secure. – user55325 Mar 11 '12 at 4:49
why hasn't this answer been selected yet? – spyroboy Oct 26 '12 at 20:27

If you want to have it "password free", you can use PublicKey authentification. It is one of the few concepts that is more secure and also easier.

All you need to do is create a keypair on the client and send the publickey to the server.

Create the keypair: (you should use a strong passphrase)

ssh-keygen -t rsa

Send your new created publickey to the server:

ssh-copy-id -i ~/.ssh/ user@server

Now you should be able to login without a password. If not, make shure to configure your ssh server like this:

PasswordAuthentication no
UsePAM no
share|improve this answer

How about setting an alias in your shell's profile?

alias sshzzz=''

Then you can just type sshzzz and then put your password in.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .