Re: [Fish-users] Autocompletion of ssh hosts on Ubuntu 12.10
On Mon, 14 Jan 2013, Thor Erik Lie wrote: > Some background: > I got multiple Ubuntu 12.10 servers that are using likewise-open to > authenticate against Windows AD. > I've created a list of hosts I want to use to autocomplete from ldap which is > saved into hosts.txt in my home directory. > > How can i make ssh autocomplete using the content of hosts.txt or from a > straight LDAP search? > > ldapsearch -LLL -H ldap://dc-01:389 -b 'dc=otc,dc=local' -D > 'OTC\Administrator' -w 'mypassword' -x objectclass=computer | grep cn: | sed > 's/cn: //' | sort -n You should edit the __fish_print_hostnames function (e.g. using `funced`), and add either `cat ~/hosts.txt` or your LDAP search command. Note that putting your password on the command line has the potential to expose it to other users on your system. Cheers, David Adam zanc...@ucc.gu.uwa.edu.au -- Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users
[Fish-users] Autocompletion of ssh hosts on Ubuntu 12.10
Hi ya, I've been using Fish for a little while now. Some background: I got multiple Ubuntu 12.10 servers that are using likewise-open to authenticate against Windows AD. I've created a list of hosts I want to use to autocomplete from ldap which is saved into hosts.txt in my home directory. How can i make ssh autocomplete using the content of hosts.txt or from a straight LDAP search? for the record, the ldap search I use: ldapsearch -LLL -H ldap://dc-01:389 -b 'dc=otc,dc=local' -D 'OTC\Administrator' -w 'mypassword' -x objectclass=computer | grep cn: | sed 's/cn: //' | sort -n -- Med vennlig hilsen/Best regards Thor Erik Lie -- Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 ___ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users