'\" t .\" Title: sshdump .\" Author: [see the "AUTHOR(S)" section] .\" Generator: Asciidoctor 2.0.26 .\" Date: 2026-09-03 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" .TH "SSHDUMP" "1" "2026-09-03" "\ \&" "\ \&" .ie \n(.g .ds Aq \(aq .el .ds Aq ' .ss \n[.ss] 0 .nh .ad l .de URL \fI\\$2\fP <\\$1>\\$3 .. .als MTO URL .if \n[.g] \{\ . mso www.tmac . am URL . ad l . . . am MTO . ad l . . . LINKSTYLE blue R < > .\} .SH "نام (NAME)" sshdump \- فراهم کردن رابط‌هایی برای ضبط بسته‌ها از یک میزبان راه دور از طریق SSH با استفاده از دودویی ضبط از راه دور. .SH "خلاصه دستور (SYNOPSIS)" .sp \fBsshdump\fP [\~\fB\-\-help\fP\~] [\~\fB\-\-version\fP\~] [\~\fB\-\-extcap\-interfaces\fP\~] [\~\fB\-\-extcap\-dlts\fP\~] [\~\fB\-\-extcap\-interface\fP=\~] [\~\fB\-\-extcap\-config\fP\~] [\~\fB\-\-extcap\-capture\-filter\fP=\~] [\~\fB\-\-capture\fP\~] [\~\fB\-\-fifo\fP=\~] [\~\fB\-\-remote\-host\fP=\~] [\~\fB\-\-remote\-port\fP=\~] [\~\fB\-\-remote\-username\fP=\~] [\~\fB\-\-remote\-password\fP=\~] [\~\fB\-\-sshkey\fP=\~] [\~\fB\-\-sshkey\-passphrase\fP=\~] [\~\fB\-\-proxycommand\fP=\~] [\~\fB\-\-remote\-interface\fP=\~] [\~\fB\-\-remote\-capture\-command\-select\fP=\~] [\~\fB\-\-remote\-capture\-command\fP=\~] [\~\fB\-\-remote\-priv\fP=\~] [\~\fB\-\-remote\-priv\-user\fP=\~] [\~\fB\-\-remote\-noprom\fP\~] [\~\fB\-\-remote\-filter\fP=\~] [\~\fB\-\-remote\-count\fP=\~] .sp \fBsshdump\fP \fB\-\-extcap\-interfaces\fP .sp \fBsshdump\fP \fB\-\-extcap\-interface\fP= \fB\-\-extcap\-dlts\fP .sp \fBsshdump\fP \fB\-\-extcap\-interface\fP= \fB\-\-extcap\-config\fP .sp \fBsshdump\fP \fB\-\-extcap\-interface\fP= \fB\-\-fifo\fP= \fB\-\-capture\fP \fB\-\-remote\-host=myremotehost\fP \fB\-\-remote\-port=22\fP \fB\-\-remote\-username=user\fP \fB\-\-remote\-interface=eth2\fP \fB\-\-remote\-capture\-command=\*(Aqtcpdump\~\-U\~\-i\~eth0\~\-w\-\*(Aq\fP .SH "توضیحات (DESCRIPTION)" .sp \fBSshdump\fP یک ابزار extcap است که امکان اجرای یک ابزار ضبط از راه دور را بر بستر یک اتصال SSH فراهم می‌کند. پیش‌نیاز آن این است که فایل اجراییِ ضبط باید دسترسی‌ها و قابلیت‌های لازم برای ضبط از رابط شبکهٔ مورد نظر را داشته باشد. .sp این قابلیت از نظر کارکرد معادل اجرای دستورهایی مانند موارد زیر است: .sp .if n .RS 4 .nf .fam C $ ssh remoteuser@remotehost \-p 22222 \*(Aqtcpdump \-U \-i IFACE \-w \-\*(Aq > FILE & $ wireshark FILE .fam .fi .if n .RE .sp .if n .RS 4 .nf .fam C $ ssh remoteuser@remotehost \*(Aq/sbin/dumpcap \-i IFACE \-P \-w \- \-f "not port 22"\*(Aq > FILE & $ wireshark FILE .fam .fi .if n .RE .sp .if n .RS 4 .nf .fam C $ ssh somehost dumpcap \-P \-w \- \-f udp | tshark \-i \- .fam .fi .if n .RE .sp به‌طور معمول sshdump مستقیماً اجرا نمی‌شود. در عوض می‌توان آن را از طریق رابط کاربری گرافیکی Wireshark یا خط فرمان آن پیکربندی کرد. دستور زیر Wireshark را اجرا کرده و ضبط را از میزبان \fBremotehost\fP آغاز می‌کند: .sp .if n .RS 4 .nf .fam C $ wireshark \*(Aq\-oextcap.sshdump.remotehost:"remotehost"\*(Aq \-i sshdump \-k .fam .fi .if n .RE .sp برای کنترل صریح دستور ضبط از راه دور: .sp .if n .RS 4 .nf .fam C $ wireshark \*(Aq\-oextcap.sshdump.remotehost:"remotehost"\*(Aq \(rs \*(Aq\-oextcap.sshdump.remotecapturecommand:"tcpdump \-i eth0 \-Uw\- not port 22"\*(Aq \(rs \-i sshdump \-k .fam .fi .if n .RE .sp رابط‌های پشتیبانی‌شده: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ . sp -1 . IP " 1." 4.2 .\} sshdump .RE.SH "گزینه‌ها (OPTIONS)" .sp \-\-help .RS 4 چاپ آرگومان‌های برنامه. .RE .sp \-\-version .RS 4 چاپ نسخه برنامه. .RE .sp \-\-extcap\-interfaces .RS 4 فهرست کردن رابط‌های موجود. .RE .sp \-\-extcap\-interface= .RS 4 استفاده از رابط‌های مشخص‌شده. .RE .sp \-\-extcap\-dlts .RS 4 فهرست کردن DLTهای رابط مشخص‌شده. .RE .sp \-\-extcap\-config .RS 4 فهرست کردن گزینه‌های پیکربندی رابط مشخص‌شده. .RE .sp \-\-extcap\-capture\-filter= .RS 4 فیلتر دریافت (capture filter). این مقدار متناظر با مقداری است که از طریق گزینه \fBtshark \-f\fP و فیلد Capture Filter در کنار فهرست رابط‌ها در واسط کاربری Wireshark ارائه می‌شود. .RE .sp \-\-capture .RS 4 شروع دریافت بسته‌ها از رابط مشخص‌شده و نوشتن داده‌های خام بسته در مکانی که با \-\-fifo تعیین شده است. .RE .sp \-\-fifo= .RS 4 ذخیره بسته دریافت‌شده در یک فایل یا ارسال آن از طریق یک لوله (pipe). .RE .sp \-\-remote\-host= .RS 4 نشانی میزبان دوردست برای دریافت بسته. .RE .sp \-\-remote\-port= .RS 4 پورت SSH میزبان دوردست. .RE .sp \-\-remote\-username= .RS 4 نام کاربری برای احراز هویت SSH. .RE .sp \-\-remote\-password= .RS 4 گذرواژه مورد استفاده (در صورتی که از ssh\-agent و کلید عمومی استفاده نشود). هشدار: گذرواژه‌ها به صورت متن آشکار (plaintext) ذخیره شده و برای تمام کاربران این سیستم قابل مشاهده هستند. توصیه می‌شود از فایل‌های کلید همراه با یک SSH agent استفاده شود. .RE .sp \-\-sshkey= .RS 4 مسیر کلید خصوصی برای احراز هویت. نکته: تنها قالب جفت کلید/مقدار OPENSSH پشتیبانی می‌شود. .RE .sp \-\-sshkey\-passphrase= .RS 4 عبارت عبور برای کلید خصوصی احراز هویت. .RE .sp \-\-proxycommand= .RS 4 دستوری که به عنوان پروکسی برای اتصال SSH استفاده می‌شود. .RE .sp \-\-remote\-interface= .RS 4 رابط شبکه دوردست برای دریافت بسته از آن. .RE .sp \-\-remote\-capture\-command\-select= .RS 4 .sp انتخاب پشتیبانی توکار از دستورهای دریافت دوردست. یکی از مقادیر \fBdumpcap\fP برای دستور دریافت دوردست با استفاده از dumpcap، یا \fBtcpdump\fP برای دستور دریافت دوردست با استفاده از tcpdump، یا \fBother\fP که در آن دستور دریافت دوردست باید با گزینه \fB\-\-remote\-capture\-command\fP ارائه شود. .sp توجه داشته باشید که انتخاب dumpcap امکان تعیین چندین رابط دریافت را به صورت یک فهرست جداشده با فاصله فراهم می‌کند، در حالی که tcpdump چنین قابلیتی ندارد. .RE .sp \-\-remote\-capture\-command= .RS 4 .sp یک دستور سفارشی دریافت دوردست که جریان راه دوری را تولید می‌کند که در Wireshark نشان داده می‌شود. این دستور باید بتواند یک جریان PCAP تولید کرده و در STDOUT بنویسد. برای مثال‌های بیشتر به ادامه متن مراجعه کنید. .sp در صورت استفاده از tcpdump، از گزینه \fB\-w\-\fP استفاده کنید تا اطمینان حاصل شود که بسته‌ها در خروجی استاندارد (stdout) نوشته می‌شوند. گزینه \fB\-U\fP را اضافه کنید تا بسته‌ها به محض دریافت نوشته شوند. .sp در صورت تعیین، این دستور همان‌طور که هست استفاده خواهد شد و گزینه‌هایی مانند فیلتر دریافت (\fB\-\-extcap\-capture\-filter\fP) به آن افزوده نخواهند شد. .RE .sp \-\-remote\-priv= .RS 4 دستوری که برای ارتقای سطح دسترسی به منظور دریافت در میزبان دوردست استفاده می‌شود؛ شامل none، sudo یا doas. .RE .sp \-\-remote\-priv\-user= .RS 4 اگر برای ارتقای سطح دسترسی جهت دریافت در میزبان دوردست از دستوری استفاده شود، ممکن است به یک نام کاربری نیاز داشته باشد. در صورت نیاز از این گزینه برای ارائه آن نام کاربری استفاده کنید. .RE .sp \-\-remote\-filter= .RS 4 فیلتر دریافت دوردست. این مقدار متناظر با مقداری است که از طریق گزینه \fBtshark \-f\fP و فیلد Capture Filter در کنار فهرست رابط‌ها در واسط کاربری Wireshark ارائه می‌شود. .RE .sp \-\-remote\-count= .RS 4 تعداد بسته‌ها برای دریافت. .RE.SH "مثال‌ها (EXAMPLES)" .sp برای دیدن آرگومان‌های برنامه: .sp .if n .RS 4 .nf .fam C sshdump \-\-help .fam .fi .if n .RE .sp برای دیدن نسخه برنامه: .sp .if n .RS 4 .nf .fam C sshdump \-\-version .fam .fi .if n .RE .sp برای دیدن رابط‌ها: .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interfaces .fam .fi .if n .RE .sp تنها یک رابط (sshdump) پشتیبانی می‌شود. .sp .B نمونه خروجی .br .sp .if n .RS 4 .nf .fam C interface {value=sshdump}{display=SSH remote capture} .fam .fi .if n .RE .sp برای دیدن DLTهای رابط: .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-extcap\-dlts .fam .fi .if n .RE .sp .B نمونه خروجی .br .sp .if n .RS 4 .nf .fam C dlt {number=147}{name=sshdump}{display=Remote capture dependent DLT} .fam .fi .if n .RE .sp برای دیدن گزینه‌های پیکربندی رابط: .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-extcap\-config .fam .fi .if n .RE .sp .B نمونه خروجی .br .sp .if n .RS 4 .nf .fam C arg {number=0}{call=\-\-remote\-host}{display=Remote SSH server address}{type=string} {tooltip=The remote SSH host. It can be both an IP address or a hostname}{required=true}{group=Server} arg {number=1}{call=\-\-remote\-port}{display=Remote SSH server port}{type=unsigned}{default=22} {tooltip=The remote SSH host port (1\-65535)}{range=1,65535}{group=Server} arg {number=2}{call=\-\-remote\-username}{display=Remote SSH server username}{type=string} {tooltip=The remote SSH username. If not provided, the current user will be used}{group=Authentication} arg {number=3}{call=\-\-remote\-password}{display=Remote SSH server password}{type=password} {tooltip=The SSH password, used when other methods (SSH agent or key files) are unavailable.}{group=Authentication} arg {number=4}{call=\-\-sshkey}{display=Path to SSH private key}{type=fileselect} {tooltip=The path on the local filesystem of the private SSH key (OpenSSH format)}{mustexist=true}{group=Authentication} arg {number=5}{call=\-\-sshkey\-passphrase}{display=SSH key passphrase}{type=password} {tooltip=Passphrase to unlock the SSH private key}{group=Authentication} arg {number=6}{call=\-\-proxycommand}{display=ProxyCommand}{type=string} {tooltip=The command to use as proxy for the SSH connection}{group=Authentication} arg {number=7}{call=\-\-remote\-interface}{display=Remote interface}{type=string} {tooltip=The remote network interface used for capture}{group=Capture} arg {number=8}{call=\-\-remote\-capture\-command\-select}{display=Remote capture command selection}{type=radio} {tooltip=The remote capture command to build a command line for}{group=Capture} value {arg=8}{value=dumpcap}{display=dumpcap} value {arg=8}{value=tcpdump}{display=tcpdump}{default=true} value {arg=8}{value=other}{display=Other:} arg {number=9}{call=\-\-remote\-capture\-command}{display=Remote capture command}{type=string} {tooltip=The remote command used to capture}{group=Capture} arg {number=10}{call=\-\-remote\-priv}{display=Gain capture privilege on the remote machine}{type=radio} {tooltip=Optionally prepend the capture command with sudo or doas on the remote machine}{group=Capture} value {arg=10}{value=none}{display=none}{default=true} value {arg=10}{value=sudo}{display=sudo} value {arg=10}{value=doas \-n}{display=doas} arg {number=11}{call=\-\-remote\-priv\-user}{display=Privileged user name for sudo or doas}{type=string} {tooltip=User name of privileged user to execute the capture command on the remote machine}{group=Capture} arg {number=12}{call=\-\-remote\-noprom}{display=No promiscuous mode}{type=boolflag} {tooltip=Don\*(Aqt use promiscuous mode on the remote machine}{group=Capture} arg {number=13}{call=\-\-remote\-filter}{display=Remote capture filter}{type=string} {tooltip=The remote capture filter}{default=not ((host myhost) and port 22)}{group=Capture} arg {number=14}{call=\-\-remote\-count}{display=Packets to capture}{type=unsigned}{default=0} {tooltip=The number of remote packets to capture. (Default: inf)}{group=Capture} arg {number=15}{call=\-\-log\-level}{display=Set the log level}{type=selector} {tooltip=Set the log level}{required=false}{group=Debug} value {arg=14}{value=message}{display=Message}{default=true} value {arg=14}{value=info}{display=Info} value {arg=14}{value=debug}{display=Debug} value {arg=14}{value=noisy}{display=Noisy} arg {number=16}{call=\-\-log\-file}{display=Use a file for logging}{type=fileselect} {tooltip=Set a file where log messages are written}{required=false}{group=Debug} .fam .fi .if n .RE .sp برای ضبط: .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-fifo=/tmp/ssh.pcap \-\-capture \-\-remote\-host 192.168.1.10 \-\-remote\-username user \-\-remote\-filter "not port 22" .fam .fi .if n .RE .sp برای استفاده از باینری‌های مختلف ضبط: .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-fifo=/tmp/ssh.pcap \-\-capture \-\-remote\-host 192.168.1.10 \-\-remote\-username user \-\-remote\-priv sudo \-\-remote\-capture\-command\-select tcpdump \-\-remote\-interface eth0 \-\-remote\-noprom .fam .fi .if n .RE .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-fifo=/tmp/ssh.pcap \-\-capture \-\-remote\-host 192.168.1.10 \-\-remote\-capture\-command=\*(Aqdumpcap \-i eth0 \-P \-w \-\*(Aq .fam .fi .if n .RE .sp .if n .RS 4 .nf .fam C sshdump \-\-extcap\-interface=sshdump \-\-fifo=/tmp/ssh.pcap \-\-capture \-\-remote\-host 192.168.1.10 \-\-remote\-capture\-command=\*(Aqsudo tcpdump \-i eth0 \-U \-w \-\*(Aq .fam .fi .if n .RE .if n .sp .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 .B نکته .ps -1 .br.sp برای توقف ضبط، کلیدهای CTRL+C را فشرده یا برنامه را kill/terminate کنید. .sp .5v .RE .sp فایل باینری sshdump می‌تواند برای پشتیبانی از چندین نمونه تغییر نام داده شود. به عنوان مثال، اگر بخواهیم sshdump دو بار در wireshark نمایش داده شود (مثلاً برای مدیریت چندین نمایه)، می‌توانیم sshdump را به sshdump\-host1 و sshdump\-host2 کپی کنیم. هر فایل باینری، نام رابطی هم‌نام با فایل اجرایی خود نشان خواهد داد. آن دسته از فایل‌های اجرایی که نام آن‌ها "sshdump" نیست، در بخش توضیحات رابط به صورت "custom version" نمایش داده خواهند شد. .SH "همچنین ببینید (SEE ALSO)" .sp wireshark(1), tshark(1), dumpcap(1), extcap(4), tcpdump(1) .SH "نکات (NOTES)" .sp \fBSshdump\fP بخشی از توزیع \fBWireshark\fP است. آخرین نسخهٔ \fBWireshark\fP را می‌توان در \c .URL "https://www.wireshark.org" "" "." .sp نسخه‌های HTML راهنمای پروژه Wireshark در این نشانی در دسترس هستند: .URL "https://www.wireshark.org/docs/man\-pages" "" "." .SH "نویسندگان (AUTHORS)" .sp .B نویسنده اصلی .br Dario Lombardo