0

When I make a ssh connection with root account to my desktop using putty and installed some programs. when I list that program type and press doubletab, will complete/list all associated commands.

Ex. Putty - SSH - 192.168.1.5

[email protected]:~# apt-get install aircrack-ng 
[email protected]:~# ai<TAB><TAB> 
airbase-ng aireplay-ng aircrack-ng airmon-ng airdecap-ng airodump-ng airdecloak-ng airtun-ng airdecloak-ng...

Xrdp - session Xorg - 192.168.1.5

[email protected]:~# air<tab><tab>
aircrack-ng airdecloak-ng

Both are [email protected]:~#. I need understand this. Other thing its on xfc4-terminal run ssh root@localhost and ssh [email protected] do the same thing above respectively.

How can I push command in xfce4-terminal after installed this packages on ssh connection?

Same happens for the history commands. Example:

  • SSH Connection: Only shows history of this user in ssh.
  • Local connection: Only shows the xfce4-terminal history. Dont show packages installed with ssh session.

I think its a 'session' association?

muru
  • 193,181
  • 53
  • 473
  • 722
danuel
  • 3
  • 3
  • I'm not sure that will help but you can try `sudo updatedb` (it will take awhile). – pa4080 Mar 27 '17 at 06:56
  • 1
    How do you access root account in xfce4-terminal? – muru Mar 27 '17 at 06:59
  • @muru I login via rdp (xrdp) enter root and pass the Xorg Graphic opens desktop. click on terminal icon. and get [email protected]:~# – danuel Mar 27 '17 at 19:04
  • You are using `root` as local account in graphical environment? This is completely wrong approach and some graphical applications may limit this behavior. You should create normal limited account and run only some commands as `root` by opening `xfce4-terminal` and run `sudo -s`, `su -` or similar command in it to become `root`. – j123b567 Mar 27 '17 at 19:13
  • @j123b567 Is not a problem because i run in live mode. Its porpose! Don't worry about security. I understand your attention! And thanks for remid that! +1 – danuel Mar 27 '17 at 20:26
  • @danuel My comment is not just about security. Some programs have hardcoded `if running as root then limit features to minimum or do nothing`. So this is the reason why it is bad idea. It may cause lot of unexpected problems like this. – j123b567 Mar 27 '17 at 20:55

1 Answers1

0

You are not root on the second case. You should run sudo su or sudo -s to become root in the xfce4-terminal and try again the ai<tab><tab>


EDIT: You should probably put this line at the end of /root/.bashrc

. ~/.bash_profile

More reading is here: Why ~/.bash_profile is not getting sourced when opening a terminal?

j123b567
  • 166
  • 5
  • Ok. Can I know the "what" and why? In xfce4-terminal: [email protected]:~# air aircrack-ng airdecloak-ng [email protected]:~#sudo -su [email protected]:~# air airbase-ng aireplay-ng aircrack-ng airmon-ng airdecap-ng airodump-ng airtun-ng airdecloak-ng Both are [email protected]. I need understand this. Other thing its on xfc4-terminal run: #ssh root@localhost and #ssh [email protected] do the same thing above respectively. – danuel Mar 27 '17 at 18:32
  • There may be some issue with `.bash_profile`, `.bashrc`, `.profile`, ... You can try to print contents of PATH variable `echo $PATH` in both cases and they will differ. – j123b567 Mar 27 '17 at 19:07
  • On SSH session
    root@kali:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    On Xorg-xfce4-terminal
    root@kali:~# echo $PATH /sbin:/bin:/usr/bin:/usr/local/bin
    WOW Some smoke!! How set same path of ssh session into xfce4-terminal? thanks @j123b567
    – danuel Mar 27 '17 at 19:39
  • @danuel I have updated the answer, this should help you – j123b567 Mar 27 '17 at 21:01