Very newbie question!

I'm sshing to two different servers, both part of the same Amazon AWS cluster. They're not run by me.

On one ssh session, the terminal lets me autocomplete. On the other session, it doesn't - I wish it did.

Why is this - is it an option set by the server administrator?

And can I do anything about it?

thanks!

link|improve this question
1  
realy not an SO question – cthom06 Oct 29 '10 at 18:18
1  
repost on ServerFault.com please – Ryley Oct 29 '10 at 18:21
1  
@Ryley - telling people to repost just results in duplicates once moderators migrate the question. Just flag it for moderator attention. – bemace Oct 29 '10 at 18:32
@bemace, sorry I had no idea that that was possible... So flag and downvote or just flag? – Ryley Oct 29 '10 at 19:18
@Ryley - it's a decent question in the wrong place, so I'd say flag but no downvote – bemace Oct 29 '10 at 19:19
show 2 more comments
feedback

migrated from stackoverflow.com Oct 30 '10 at 0:11

This question came from our site for professional and enthusiast programmers.

3 Answers

This isn't really a programming question, but it has to do with your shell. You can try starting the bash shell (by typing bash at the prompt) and see if you can autocomplete.

If that works you can use which bash to verify it's location and then chsh -s /bin/bash to set your shell permanently.

A list of available shells can also be found in /etc/shells.

link|improve this answer
feedback

It is a combination of the shell that is being used in your ssh session as well as it's configuration.

While your shell may support autocompletion it may not be configured for it. If you're using the bash shell, you can edit your local .bashrc file for the following to provide autocomplete.

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
link|improve this answer
The bash completion package is only needed for more advanced completion of things like command line options, server names, VCS repository directories, ... . Completion of commands, directories, file names, variables and user names works without it. – ak2 Oct 30 '10 at 8:52
feedback

IIRC it could also be an issue that ssh hashes the hostnames in ~/.ssh/known_hosts

most installations I know use ~/.ssh/known_hosts as source for the list of available hosts for completion but some systems also started to set "HashKnownHosts yes", which prohibits using known_hosts as a source....

if your known hosts lines start with something like

|1|BWO5qDxk/cFH0wa05JLdHn+j6xQ=|rXQvIxh5cDD3C4

then hashing is activated.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown