[{"data":1,"prerenderedAt":835},["ShallowReactive",2],{"\u002Fnetwork\u002Fsftp-server":3,"\u002Fnetwork":590},{"id":4,"title":5,"body":6,"description":582,"extension":583,"meta":584,"navigation":585,"path":586,"seo":587,"stem":588,"__hash__":589},"networks\u002Fnetwork\u002Fsftp-server.md","How to Run an SFTP Server on Android",{"type":7,"value":8,"toc":571},"minimark",[9,13,22,27,98,102,145,148,152,157,167,183,188,193,198,225,230,245,249,252,303,310,341,344,348,406,410,413,439,443,526,530,555,559,567],[10,11,12],"p",{},"AnExplorer's SFTP Server turns your Android phone into an SSH-accessible file server. Connect from any SSH\u002FSFTP client on a laptop, desktop, or remote server — your phone's storage is securely exposed over the network.",[10,14,15,16,21],{},"Unlike the basic ",[17,18,20],"a",{"href":19},"\u002Fnetwork\u002Fftp-server","FTP Server",", SFTP is encrypted over SSH. Every file transfer is protected, making SFTP Server appropriate for accessing your phone remotely over the internet or on untrusted networks.",[23,24,26],"h2",{"id":25},"when-to-use-sftp-server-instead-of-ftp-server","When to Use SFTP Server Instead of FTP Server",[28,29,30,43],"table",{},[31,32,33],"thead",{},[34,35,36,40],"tr",{},[37,38,39],"th",{},"Situation",[37,41,42],{},"Use",[44,45,46,57,65,73,85],"tbody",{},[34,47,48,52],{},[49,50,51],"td",{},"Home Wi-Fi, trusted network",[49,53,54,56],{},[17,55,20],{"href":19}," (simpler)",[34,58,59,62],{},[49,60,61],{},"Public Wi-Fi, office, or remote access",[49,63,64],{},"SFTP Server (encrypted)",[34,66,67,70],{},[49,68,69],{},"Automating backups from a PC\u002Fserver to phone",[49,71,72],{},"SFTP Server",[34,74,75,83],{},[49,76,77,78,82],{},"Another developer needs to ",[79,80,81],"code",{},"scp"," files to your phone",[49,84,72],{},[34,86,87,96],{},[49,88,89,90,93,94],{},"Connecting from a Linux\u002FMac terminal via ",[79,91,92],{},"sftp"," or ",[79,95,81],{},[49,97,72],{},[23,99,101],{"id":100},"how-to-start-the-sftp-server","How to Start the SFTP Server",[103,104,105,113,116,121,127,134],"ol",{},[106,107,108,109],"li",{},"Open ",[110,111,112],"strong",{},"AnExplorer",[106,114,115],{},"Open the menu sidebar (tap ≡ or swipe right)",[106,117,118,119],{},"Select ",[110,120,72],{},[106,122,123,124],{},"Tap ",[110,125,126],{},"Start",[106,128,129,130,133],{},"AnExplorer shows: ",[110,131,132],{},"Host: 192.168.x.x, Port: 2222"," (or your configured port)",[106,135,136,137,140,141,144],{},"Set a ",[110,138,139],{},"username"," and ",[110,142,143],{},"password"," in the SFTP Server settings — never leave an SFTP server open without credentials",[10,146,147],{},"The server only runs while AnExplorer is active. It shuts down when you close the app or the system kills it to free memory.",[23,149,151],{"id":150},"connecting-from-a-computer","Connecting from a Computer",[10,153,154],{},[110,155,156],{},"From Windows (command prompt or PowerShell):",[158,159,164],"pre",{"className":160,"code":162,"language":163},[161],"language-text","sftp -P 2222 username@192.168.1.105\n","text",[79,165,162],{"__ignoreMap":166},"",[10,168,169,170,173,174,173,177,173,180],{},"Then use SFTP commands: ",[79,171,172],{},"ls",", ",[79,175,176],{},"get filename",[79,178,179],{},"put filename",[79,181,182],{},"exit",[10,184,185],{},[110,186,187],{},"From Linux or Mac (terminal):",[158,189,191],{"className":190,"code":162,"language":163},[161],[79,192,162],{"__ignoreMap":166},[10,194,195],{},[110,196,197],{},"From FileZilla (Windows\u002FMac\u002FLinux):",[103,199,200,203,209,219,222],{},[106,201,202],{},"Site Manager > New Site",[106,204,205,206],{},"Protocol: ",[110,207,208],{},"SFTP – SSH File Transfer Protocol",[106,210,211,212,215,216],{},"Host: ",[79,213,214],{},"192.168.1.105",", Port: ",[79,217,218],{},"2222",[106,220,221],{},"Logon type: Normal, username, password",[106,223,224],{},"Connect",[10,226,227],{},[110,228,229],{},"From Cyberduck (Mac):",[103,231,232,235,242],{},[106,233,234],{},"Open Connection > SFTP (SSH File Transfer Protocol)",[106,236,237,238,215,240],{},"Server: ",[79,239,214],{},[79,241,218],{},[106,243,244],{},"Enter username and password",[23,246,248],{"id":247},"automating-pull-phone-files-from-a-linux-server","Automating: Pull Phone Files from a Linux Server",[10,250,251],{},"A common workflow for developers: automatically back up phone contents to a Linux home server using a cron job:",[158,253,257],{"className":254,"code":255,"language":256,"meta":166,"style":166},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# cron entry (runs every night at 2am)\n0 2 * * * sftp -P 2222 myuser@192.168.1.105:\u002Fsdcard\u002FDCIM \u002Fbackup\u002Fphone-photos\u002F\n","bash",[79,258,259,268],{"__ignoreMap":166},[260,261,264],"span",{"class":262,"line":263},"line",1,[260,265,267],{"class":266},"sHwdD","# cron entry (runs every night at 2am)\n",[260,269,271,275,279,283,285,287,291,294,297,300],{"class":262,"line":270},2,[260,272,274],{"class":273},"sBMFI","0",[260,276,278],{"class":277},"sbssI"," 2",[260,280,282],{"class":281},"sTEyZ"," *",[260,284,282],{"class":281},[260,286,282],{"class":281},[260,288,290],{"class":289},"sfazB"," sftp",[260,292,293],{"class":289}," -P",[260,295,296],{"class":277}," 2222",[260,298,299],{"class":289}," myuser@192.168.1.105:\u002Fsdcard\u002FDCIM",[260,301,302],{"class":289}," \u002Fbackup\u002Fphone-photos\u002F\n",[10,304,305,306,309],{},"Or use ",[79,307,308],{},"rsync"," over SSH (if the phone SFTP server supports rsync commands — varies by implementation):",[158,311,313],{"className":254,"code":312,"language":256,"meta":166,"style":166},"rsync -avz -e \"ssh -p 2222\" myuser@192.168.1.105:\u002Fsdcard\u002F \u002Fbackup\u002Fphone\u002F\n",[79,314,315],{"__ignoreMap":166},[260,316,317,319,322,325,329,332,335,338],{"class":262,"line":263},[260,318,308],{"class":273},[260,320,321],{"class":289}," -avz",[260,323,324],{"class":289}," -e",[260,326,328],{"class":327},"sMK4o"," \"",[260,330,331],{"class":289},"ssh -p 2222",[260,333,334],{"class":327},"\"",[260,336,337],{"class":289}," myuser@192.168.1.105:\u002Fsdcard\u002F",[260,339,340],{"class":289}," \u002Fbackup\u002Fphone\u002F\n",[10,342,343],{},"This is a reliable way to maintain an automatic photo\u002Fvideo backup from phone to NAS or home server without any cloud service.",[23,345,347],{"id":346},"sftp-server-settings","SFTP Server Settings",[28,349,350,360],{},[31,351,352],{},[34,353,354,357],{},[37,355,356],{},"Setting",[37,358,359],{},"Recommendation",[44,361,362,370,378,386,398],{},[34,363,364,367],{},[49,365,366],{},"Port",[49,368,369],{},"2222 (default, avoids conflict with system SSH on port 22)",[34,371,372,375],{},[49,373,374],{},"Username",[49,376,377],{},"Choose something non-trivial",[34,379,380,383],{},[49,381,382],{},"Password",[49,384,385],{},"Use a strong password",[34,387,388,391],{},[49,389,390],{},"Root directory",[49,392,393,394,397],{},"Restrict to ",[79,395,396],{},"\u002Fsdcard\u002F"," or a specific folder",[34,399,400,403],{},[49,401,402],{},"SSH key auth",[49,404,405],{},"Available for key-based clients",[23,407,409],{"id":408},"security-sftp-port-exposure","Security: SFTP Port Exposure",[10,411,412],{},"The SFTP Server binds to your phone's current IP on the local network by default. If you want to access it from outside your home:",[103,414,415,422,425,431],{},[106,416,417,418,421],{},"Enable ",[110,419,420],{},"port forwarding"," on your router: forward external port → phone IP port 2222",[106,423,424],{},"Use your router's public IP or DDNS hostname to connect remotely",[106,426,427,430],{},[110,428,429],{},"Always use a password"," when exposing SFTP to the internet",[106,432,433,434,438],{},"Consider a VPN (",[17,435,437],{"href":436},"\u002Fnetwork\u002Fopenvpn-share","OpenVPN",") instead of port-forwarding for better security",[23,440,442],{"id":441},"sftp-server-vs-ftp-server-vs-device-connect","SFTP Server vs FTP Server vs Device Connect",[28,444,445,458],{},[31,446,447],{},[34,448,449,451,453,455],{},[37,450],{},[37,452,72],{},[37,454,20],{},[37,456,457],{},"Device Connect",[44,459,460,473,484,495,509],{},[34,461,462,465,468,471],{},[49,463,464],{},"Encrypted",[49,466,467],{},"✅",[49,469,470],{},"❌",[49,472,470],{},[34,474,475,478,480,482],{},[49,476,477],{},"Requires SSH client",[49,479,467],{},[49,481,470],{},[49,483,470],{},[34,485,486,489,491,493],{},[49,487,488],{},"Works from any browser",[49,490,470],{},[49,492,470],{},[49,494,467],{},[34,496,497,500,503,506],{},[49,498,499],{},"Best for",[49,501,502],{},"Remote\u002Fsecure access",[49,504,505],{},"LAN transfers",[49,507,508],{},"Quick sharing",[34,510,511,514,517,521],{},[49,512,513],{},"Related guide",[49,515,516],{},"This page",[49,518,519],{},[17,520,20],{"href":19},[49,522,523],{},[17,524,457],{"href":525},"\u002Fnetwork\u002Flocal-server",[23,527,529],{"id":528},"related-guides","Related Guides",[531,532,533,539,544,549],"ul",{},[106,534,535],{},[17,536,538],{"href":537},"\u002Fnetwork\u002Fsftp","SFTP client — connect to remote servers",[106,540,541],{},[17,542,543],{"href":19},"FTP Server — simpler LAN server",[106,545,546],{},[17,547,548],{"href":525},"Device Connect — HTTP server for browsers",[106,550,551],{},[17,552,554],{"href":553},"\u002Ftransfer\u002Fandroid-to-pc","Transfer from Android to PC",[23,556,558],{"id":557},"install","Install",[10,560,561],{},[17,562,566],{"href":563,"rel":564},"https:\u002F\u002Fplay.google.com\u002Fstore\u002Fapps\u002Fdetails?id=dev.dworks.apps.anexplorer",[565],"nofollow","Install AnExplorer",[568,569,570],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}",{"title":166,"searchDepth":270,"depth":270,"links":572},[573,574,575,576,577,578,579,580,581],{"id":25,"depth":270,"text":26},{"id":100,"depth":270,"text":101},{"id":150,"depth":270,"text":151},{"id":247,"depth":270,"text":248},{"id":346,"depth":270,"text":347},{"id":408,"depth":270,"text":409},{"id":441,"depth":270,"text":442},{"id":528,"depth":270,"text":529},{"id":557,"depth":270,"text":558},"AnExplorer can run an SFTP server on your phone, letting laptops and servers securely pull or push files over SSH. Encrypted transfers over Wi-Fi or internet. Full setup and connection guide.","md",{},true,"\u002Fnetwork\u002Fsftp-server",{"title":5,"description":582},"network\u002Fsftp-server","PHgac7hOllbSH2AGnlhgyOFVMXRfPLq-RERYTHKvGeg",{"id":591,"title":592,"body":593,"description":819,"extension":583,"meta":820,"navigation":585,"path":831,"seo":832,"stem":833,"__hash__":834},"content\u002Fnetwork.md","Android Network File Access Guides for SMB, FTP, SFTP & NAS",{"type":7,"value":594,"toc":813},[595,598,602,652,656,680,684,692,696],[10,596,597],{},"AnExplorer connects to every major network file protocol — as both a client (connect to a server) and a server (run a server from your phone).",[23,599,601],{"id":600},"connect-to-a-remote-server-client","Connect to a Remote Server (Client)",[531,603,604,611,617,624,631,638,645],{},[106,605,606,610],{},[17,607,609],{"href":608},"\u002Fnetwork\u002Fftp","FTP"," — connect to FTP servers on NAS, routers, or PCs",[106,612,613,616],{},[17,614,615],{"href":537},"SFTP"," — secure SSH-based file transfer; VPS, NAS, Raspberry Pi",[106,618,619,623],{},[17,620,622],{"href":621},"\u002Fnetwork\u002Fsmb","SMB"," — Windows file shares, Samba; fastest for LAN NAS access",[106,625,626,630],{},[17,627,629],{"href":628},"\u002Fnetwork\u002Fwebdav","WebDAV"," — Nextcloud, ownCloud, pCloud, Synology; HTTPS-friendly",[106,632,633,637],{},[17,634,636],{"href":635},"\u002Fnetwork\u002Fnas","NAS"," — brand-specific setup guides for Synology, QNAP, WD, TrueNAS",[106,639,640,644],{},[17,641,643],{"href":642},"\u002Fnetwork\u002Fdlna","DLNA \u002F UPnP"," — browse media server libraries (Plex, Jellyfin, Kodi)",[106,646,647,651],{},[17,648,650],{"href":649},"\u002Fnetwork\u002Fmedia-server","Media Server"," — access Plex, Jellyfin, Emby, Kodi from your phone",[23,653,655],{"id":654},"run-a-server-from-your-phone","Run a Server from Your Phone",[531,657,658,663,668,675],{},[106,659,660,662],{},[17,661,20],{"href":19}," — start an FTP server on Android; connect from Windows, Mac, Linux",[106,664,665,667],{},[17,666,72],{"href":586}," — encrypted SSH server on your phone",[106,669,670,674],{},[17,671,673],{"href":672},"\u002Fnetwork\u002Fwebdav-server","WebDAV Server"," — browser-accessible file server; works with macOS Finder and Windows",[106,676,677,679],{},[17,678,457],{"href":525}," — built-in HTTP server; browse phone files in any PC browser",[23,681,683],{"id":682},"privacy-and-remote-access","Privacy and Remote Access",[531,685,686],{},[106,687,688,691],{},[17,689,690],{"href":436},"VPN + File Sharing"," — WireGuard, OpenVPN, Tailscale for remote LAN access",[23,693,695],{"id":694},"protocol-quick-reference","Protocol Quick Reference",[28,697,698,710],{},[31,699,700],{},[34,701,702,705,707],{},[37,703,704],{},"Protocol",[37,706,366],{},[37,708,709],{},"Best For",[44,711,712,722,733,743,753,763,774,784,793,803],{},[34,713,714,716,719],{},[49,715,609],{},[49,717,718],{},"21",[49,720,721],{},"Legacy NAS, routers",[34,723,724,727,730],{},[49,725,726],{},"FTPS",[49,728,729],{},"990",[49,731,732],{},"FTP with TLS",[34,734,735,737,740],{},[49,736,615],{},[49,738,739],{},"22",[49,741,742],{},"Secure remote servers, VPS",[34,744,745,747,750],{},[49,746,622],{},[49,748,749],{},"445",[49,751,752],{},"Windows shares, LAN NAS",[34,754,755,757,760],{},[49,756,629],{},[49,758,759],{},"80\u002F443",[49,761,762],{},"Nextcloud, cloud bridging",[34,764,765,768,771],{},[49,766,767],{},"DLNA",[49,769,770],{},"Auto",[49,772,773],{},"Media libraries",[34,775,776,778,781],{},[49,777,20],{},[49,779,780],{},"2221",[49,782,783],{},"Share phone over network",[34,785,786,788,790],{},[49,787,72],{},[49,789,218],{},[49,791,792],{},"Secure phone sharing",[34,794,795,797,800],{},[49,796,673],{},[49,798,799],{},"8765",[49,801,802],{},"Browser-friendly phone sharing",[34,804,805,807,810],{},[49,806,457],{},[49,808,809],{},"8080",[49,811,812],{},"Browser-based wireless access",{"title":166,"searchDepth":270,"depth":270,"links":814},[815,816,817,818],{"id":600,"depth":270,"text":601},{"id":654,"depth":270,"text":655},{"id":682,"depth":270,"text":683},{"id":694,"depth":270,"text":695},"Connect Android to FTP, SFTP, SMB, WebDAV, NAS, DLNA, and media servers with AnExplorer. Also run FTP, SFTP, and WebDAV servers on your Android phone.",{"faq":821},[822,825,828],{"q":823,"a":824},"What network protocols does AnExplorer support?","AnExplorer supports FTP, SFTP, SMB (Windows shares), WebDAV, DLNA\u002FUPnP, NAS devices, and local HTTP server access. Both client mode (connect to a server) and server mode (run a server from your Android phone) are available.",{"q":826,"a":827},"Can AnExplorer connect to my NAS?","Yes. AnExplorer connects to all major NAS brands — Synology, QNAP, WD, TrueNAS — via SMB, FTP, SFTP, or WebDAV protocols.",{"q":829,"a":830},"Can I browse my phone files from a computer?","Yes. The Device Connect feature turns your phone into a local HTTP server. Open any browser on a PC on the same Wi-Fi network and access all your phone files — no software needed on the computer.","\u002Fnetwork",{"title":592,"description":819},"network","3Jc6JqtYgv15mlNFeK9ooNU2sjZ80ZSs5CRLjkR9Zd8",1776756980358]