History of each terminal

10 views
Skip to first unread message

shamlik t

unread,
Mar 20, 2015, 11:28:45 AM3/20/15
to mes-...@googlegroups.com
Friends,

I use tabs in gnome terminal and .
each tab maintains its own history.

It is very tough to find a previously ran command,
as I have to open the same number of tab, to find it in history.

Why it is designed so?

How to merge all the tab's commands in single history file,
so that we can access the history from any shell.?

Ershad K

unread,
Mar 20, 2015, 12:41:42 PM3/20/15
to mes-fsug
Hi Shamlik,

Which shell are you using in gnome-terminal? If it's bash, you could
find the entire history in ~/.bash_history file and it's searchable
through ctrl+r. Just that history gets written when you close the bash
session.

Try this[1] if you would like to update history on every command execution.

[1] http://askubuntu.com/a/80380

Cheers.
> --
> --
> You received this message because you are subscribed to the "MES-FSUG"
> group.
> To post to this group, send email to mes-...@googlegroups.com
> To unsubscribe from this group, send email to
> mes-fsug-u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/mes-fsug?hl=en
>
> Our IRC channel #mes-fsug at irc.freenode.net. Webpage for GNULabs @ MESCE
> is at http://gnulabs.org/mesce/
>
> ---
> You received this message because you are subscribed to the Google Groups
> "MES-FSUG" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mes-fsug+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Regards,
Ershad K
http://ershadk.com

shamlik t

unread,
Mar 21, 2015, 12:23:41 AM3/21/15
to mes-...@googlegroups.com

Nooh Pulakkal

unread,
Mar 27, 2015, 7:34:03 AM3/27/15
to mes-...@googlegroups.com

Is there anyway to get all the remote pcs ssh to my server?
~/.ssh/known_hosts showing only some IP infos. It might be due to the same issue. Right?

ബാലശങ്കർ സി

unread,
Mar 27, 2015, 7:50:43 AM3/27/15
to mes-...@googlegroups.com
Hi,

~/.ssh/known_hosts file is used for server authentication i.e to confirm that we are actually connecting to a known server rather than a rogue one trying to pass off as the right one.

To let remote pcs ssh to your server (I am assuming you need passwordless login), you need the file ~/.ssh/authorized_keys which contains the ssh keys from client machines and some keyring agent in the remote servers which caches the ssh passphrase.


PS : I couldn't understand how this is related to the original thread. That was talking about the history file right?
Regards,
Balasankar C
http://balasankarc.in

"Freedom is never easily won, but once established, freedom lasts, spreads and chokes out tyranny." - Trent Lott

Nooh Pulakkal

unread,
Mar 27, 2015, 10:38:27 AM3/27/15
to mes-...@googlegroups.com

Thanks Mr.Balashankar for sharing the links.
I think you havent understood my question. I am not at all asking about authentication at all. Those can be done by public and private keys. For no password login or root login access, we can edit the ssh configuration file,say /etc/ssh/sshd_conf for RHEL6.

I am not asking such deeper things. I was just asking why the ssh/known_hosts not storing all the accessed IP details just like terminal history.
In RHEL6,when I am trying to connect from different IPs to same server, the server is not showing all the IPs connected now or previously connected IPs in the same file. It seems to be logically ambigous to sort out IPs connected. What is the idea used there ?

Manu Krishnan T.V

unread,
Mar 27, 2015, 12:50:29 PM3/27/15
to mes-...@googlegroups.com
ssh/known_hosts file is a local user database. It stores details of all remote servers you connected from the system. When you are connecting to a remote server for the first time, ssh asks for a verification (For which we have to type yes). Then, it stores some related information of the server, a fingerprint, etc to notify us for any man in the middle kind of attacks the next time you connect to the same server. If the stored information matches, you will be allowed to login without issues.

Usually login attempts to systems are logged in /var/log/auth.log. For SSH logins, you can go a grep on that file. grep "sshd" /var/log/auth.log shows all successful and failed login attempts with time and IP for me on my debian based servers.
--
Regards,
Manu Krishnan T V

Co-Founder | DayScholars Innovations
SysAdmin | Cool-Works Web Solutions
Blogs at Bizzard.info & can be found in social networks as @tvmanukrishnan

Balasankar C

unread,
Mar 27, 2015, 12:51:45 PM3/27/15
to mes-...@googlegroups.com
Err.. I think either me or you are mistaken here. In my understanding,
it goes like this :-

Suppose client X uses ssh to login to server Y. Then the DSA key of Y
is stored in X's known_hosts file. The known_hosts file in the server
plays no role here.

known_hosts doesn't involve storing the list of clients connected to a
server. Rather, it lists all the servers the client (to be specific,
the user logged in at the client system) has ever connected to via ssh.

Balasankar C

unread,
Mar 27, 2015, 12:51:45 PM3/27/15
to mes-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On വെള്ളി 27 മാര്‍ച്ച് 2015 08:08 വൈകു, Nooh Pulakkal wrote:
> I am not asking such deeper things. I was just asking why the
> ssh/known_hosts not storing all the accessed IP details just like
> terminal history. In RHEL6,when I am trying to connect from
> different IPs to same server, the server is not showing all the IPs
> connected now or previously connected IPs in the same file. It
> seems to be logically ambigous to sort out IPs connected. What is
> the idea used there ?

Err.. I think either me or you are mistaken here. In my understanding,
it goes like this :-

Suppose client X uses ssh to login to server Y. Then the DSA key of Y
is stored in X's known_hosts file. The known_hosts file in the server
plays no role here.

known_hosts doesn't involve storing the list of clients connected to a
server. Rather, it lists all the servers the client (to be specific,
the user logged in at the client system) has ever connected to.

- --
Regards
Balasankar C
http://balasankarc.in
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCgAGBQJVFXNHAAoJEJbtq5sua3FxDQUIAJG/h7RyXyRQeI0hsW4yauiH
sJecJb+W0HdgSJTvTuOJPxvENgaR27IdsLjOFzMvdXAqM8oMvPKbiLbUZIAXk5ng
PoMj2/lGiMwFXm6ms7pVtW4eZTTAIzSwRzntUSr1L0wyC6kZq4SPvbBkUZLYuWpa
zaAq+5DQMptzneCE6t8dYmXQDRreGrMMjX4BhAEQ/fggOh08+eIO1Pp4FKPTP4jn
fcDEB6hP6GRa94hLilcKsV2kfx1P2DQCBLkpeu6jk1juAuS9ykRh7P2RMUYiG7Xg
+bGxHwitZurycLB/592PWEUgAhrYHhStYrC7tQ0K7i0XW1BF9PD0g8xbWGNCcRA=
=Wrls
-----END PGP SIGNATURE-----

Mahesh M

unread,
Mar 28, 2015, 8:33:57 AM3/28/15
to mes-...@googlegroups.com
@Nooh,

Please maintain the thread topic discipline. 

Thanks 
Regards,

Mahesh M

Reply all
Reply to author
Forward
0 new messages