Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-11-2014, 07:27 AM   #1
Registered: Feb 2007
Posts: 36

Rep: Reputation: 15
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.

Old 11-11-2014, 08:13 AM   #2
Senior Member
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,448

Rep: Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889Reputation: 889
SCP is your friend!

man scp
Old 11-11-2014, 08:16 AM   #3
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,143

Rep: Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877Reputation: 877
Originally Posted by TenTenths View Post
SCP is your friend!

man scp
and sftp mite be more human friendlier ?
Old 11-11-2014, 08:52 AM   #4
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
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:

# send all log messages to the the server at
*.* @
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.
Old 11-11-2014, 12:30 PM   #5
LQ Newbie
Registered: Nov 2014
Location: Brazil
Distribution: Debian, Ubuntu
Posts: 2

Rep: Reputation: Disabled

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

scp -P22 /var/log/syslog root@
scp - Command
-P22 - Port 22
/var/log/syslog - File or directory of source.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Clonezilla - Copy /dev/sda2 on computer 1 => /dev/sda4 on computer 2 pizzipie Linux - Software 13 08-04-2014 08:35 PM
[SOLVED] using ssh on remote computer to connect to home computer behind two routers Volofrog Linux - Networking 8 12-25-2012 03:02 PM
[SOLVED] Logging ssh messages in a separate file using syslog-ng satya123 Linux - Newbie 1 07-02-2011 08:01 AM
Problem with loging ssh with syslog-ng takayama Linux - Server 1 11-26-2010 04:04 PM
Can't copy files from an SCO Unix System V computer to a Linux computer gnppapas Linux - General 2 11-27-2004 01:39 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration