0

I have the following alias in my .bash_profile file:

alias rlogin="ssh -l elykl33t rlogin.server"

Of course this is not the actual username or server address.

When I, after relaunching terminal, type "rlogin" I am met with:

usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-I pkcs11] [-i identity_file]
           [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-W host:port] [-w local_tun[:remote_tun]]
           [user@]hostname [command]

If I run the command source .bash_profile then the command works fine. Am I doing something wrong? Is this type of command just not possible the way I'm doing it?

Thanks guys!

2
  • In a new terminal, what does type -a rlogin tell you? It sounds like a new terminal does not give you a login shell, so if you log out and log in you'll be fine. Feb 4, 2014 at 21:47
  • It says 'rlogin is /usr/bin/rlogin'
    – elykl33t
    Feb 4, 2014 at 22:02

1 Answer 1

2

I get that output too when I type /usr/bin/rlogin with no arguments. My system has this set of symbolic links:

/usr/bin/rlogin -> /etc/alternatives/rlogin
/etc/alternatives/rlogin -> /usr/bin/slogin
/usr/bin/slogin -> ssh

So when you call rlogin, you are calling ssh already.

Your terminals do not launch a login shell, so the changes to .bash_profile do not get seen. Either:

  1. log out and log back in.
  2. move your alias to .bashrc

You must log in to answer this question.

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