*HELP PLZ* How can I activate ssh logging?

allofus

New Member
Messages
183
Reaction score
2
Points
0
Hi,

I have a vps package

X5

ubuntu-9.04-x86 is our chosen OS.


My question is;
How do I initiate SSH hisory logs?

I also have a shared hosting package - corporate - When I use putty to access this server I can press the up arrow and scroll through previous administered commands and I would like to be able to do the same with the VPS.

Many of the commands I use are repeats and at present I use notepadd++ and cut/paste to the terminal when administering the VPS.


I am only using 10% of our available ram and effectively 0% available space so installing an application should not be an issue for us. I am fairly familiar with using SSH and the VPS but I am not sure which application would best serve?

Please advise.
 

toyowheelin

Community Advocate
Community Support
Messages
153
Reaction score
5
Points
0
All of the issues you listed should be enabled by default, for instance the "ssh logs" should be stored in /var/log/auth.log, and by default ubuntu uses bash shell and should also automatically store previously used commands.
 

allofus

New Member
Messages
183
Reaction score
2
Points
0
All of the issues you listed should be enabled by default, for instance the "ssh logs" should be stored in /var/log/auth.log, and by default ubuntu uses bash shell and should also automatically store previously used commands.

hmm

Ok I did SSH into another account I have on the server and you are right.... *blushes*

It seems that the ***vm account is the only account that does not do this so I guess it is time to change a habit and login as roo instead of ***vm.


Thanks for the heads up toyowheelin.
Edit:
If I may ask another question....


with my ***vm account I used the hypervm web interface to add an ssh key.

Can you advise me of how I can use the same key when I connect direct via one of my vps IP's?

Thanks in advance.
 
Last edited:

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Do you mean that you want to run commands you previously ran, but then closed SSH and when you return, you want to be able to access those commands again by using the arrow keys?

If this is what you want, type 'screen' without ', then enter to accept the license. Then use the commands you usually do. Next time you login to SSH, type 'screen -ls' without ', to see all the detached sessions. Then, write 'screen -r *name of the session listed in screen -ls*' without '. Now you can access previously ran commands with the arrow keys. This will also allow you to see all the commands you ran, as screen keeps one session, so it looks like you never logged of.
 
Last edited:

allofus

New Member
Messages
183
Reaction score
2
Points
0
Do you mean that you want to run commands you previously ran, but then closed SSH and when you return, you want to be able to access those commands again by using the arrow keys?

If this is what you want, type 'screen' without ', then enter to accept the license. Then use the commands you usually do. Next time you login to SSH, type 'screen -ls' without ', to see all the detached sessions. Then, write 'screen -r *name of the session listed in screen -ls*' without '. Now you can access previously ran commands with the arrow keys. This will also allow you to see all the commands you ran, as screen keeps one session, so it looks like you never logged of.

Thanks,

I will give it a try, but since I can connect as root without using my ***vm access I think I will just do that. The history is already available to me using the arrow keys.


Ok I tried it
Code:
root@localhost:/# screen -ls
Code:
There is a screen on:
        25958.pts-2.localhost   (02/14/10 15:04:46)     (Detached)
1 Socket in /var/run/screen/S-root.

There is no name that I can see. I tried S-root, i tried 1, i tried Detatched...

adding a password and connecting via one of the vps ip's seems to be the simplest option available to me.

Thanks so much for the assistance all the same vigge_sWe.
Edit:
ok, the name

Code:
screen -r 25958.pts-2.localhost


This did work for me.

going direct to root still makes more sense to me and I had not thought of it before, der!!!!

The history logs are right there as suggested, arrow up on putty to scroll through past logs. Just what I wanted.

Thanks again peeps.
 
Last edited:
Top