LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Copy syslog via ssh to another computer (https://www.linuxquestions.org/questions/linux-newbie-8/copy-syslog-via-ssh-to-another-computer-4175525068/)

fillister 11-11-2014 07:27 AM

Copy syslog via ssh to another computer
 
Hello all,

I have a raspberry PI running raspbian that I use for home automation. I want (need) to copy the syslog so that I can send it to a forum for analysis and troubleshooting. The raspberry is on a home network and I typically ssh into it from my desktop which is running mint 14. Is there a way to copy the syslog to my desktop so that I may post it to a forum for troubleshooting?

Thanks for your help.

Greg

TenTenths 11-11-2014 08:13 AM

SCP is your friend!

Code:

man scp

schneidz 11-11-2014 08:16 AM

Quote:

Originally Posted by TenTenths (Post 5268170)
SCP is your friend!

Code:

man scp

and sftp mite be more human friendlier ?

btmiller 11-11-2014 08:52 AM

Note also that most syslog daemons have a mechanism to export log entries to a remote machine. Usually the syslog configuration on the server you want to receive the logs must be specially set up to do this by being configured to listen on the network interface (the details vary by syslogd). Then on the client you can usually add something to the syslog.conf or its equivalent like:

Code:

# send all log messages to the the server at 192.168.1.3
*.* @192.168.1.3

Note that the messages will still get logged locally; they'll just get sent to the remote server as well.

If you just need to copy the occasional log file every now and then, scp is probably the way to go, but if you want to consistently receive log messages from your Pi on your workstation, it might be worth setting this up.

slucas263 11-11-2014 12:30 PM

Hello,

Well, for you copy a sysconfig file, use the following command:

scp -P22 /var/log/syslog root@192.168.10.5:/var/log2/syslog
scp - Command
-P22 - Port 22
/var/log/syslog - File or directory of source.
root@192.168.10.5:/var/log2/syslog - User@IPADDRESSorFQDN: DIRECTORYofDESTINATION


\0/


All times are GMT -5. The time now is 12:35 PM.