Kodi Community Forum

Full Version: [ATV] ssh from directly from within one AppleTV to another AppleTV?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

within this forum i found a solution to sync to apple tv's. it works like charm when i do it manually with winSCP. The solution is to copy the complete folder '/Users/frontrow/Library/Application Support/XBMV' to the same path on the other aTV.

now i would try to do it through a cron script. my problem is now following:

- i connect to the 1. atv via windows putty ssh
- now i would open a ssh connection from the 1. atv shell, but the ssh command is not known.

It seems that the ssh command is not available on the aTV's OS-X. Please can anyone tell me how to make a shell connection from one atv to another one?

Thanx in advance.

Efty
efty.edge Wrote:Hi,

within this forum i found a solution to sync to apple tv's. it works like charm when i do it manually with winSCP. The solution is to copy the complete folder '/Users/frontrow/Library/Application Support/XBMV' to the same path on the other aTV.

now i would try to do it through a cron script. my problem is now following:

- i connect to the 1. atv via windows putty ssh
- now i would open a ssh connection from the 1. atv shell, but the ssh command is not known.

It seems that the ssh command is not available on the aTV's OS-X. Please can anyone tell me how to make a shell connection from one atv to another one?

Thanx in advance.

Efty

ssh via dropbear seems to be missing the ability to ssh out. No fix is planned as yet.
@davilla

Thanx for your quick reply. I'm sad to hear this. But can you tell me if there is a third party solution for my problem or another workaround!?

Thanx again.

Efty
efty.edge Wrote:@davilla

Thanx for your quick reply. I'm sad to hear this. But can you tell me if there is a third party solution for my problem or another workaround!?

Thanx again.

Efty

The fix is to use openssh instead of dropbear. The next version of atvusb-creator will be using openssh. No time frame on release.
@davilla

Thanx again for the good news. Until the release of OpenSSH i've made a workaround with a WinSCP Script running on my Windows Notebook. Everytime i need to sync i start this script manualy.

Here is my solution - This works only under Windows! I've tested it with two aTV's 2.3 with XBMC Atlantis bf1.


1. The Batch File to activate the Wireless Connection to each aTV and to start the WinSCP Script. Copy the Code between <Start> and <End> in a File names XBMCsync.bat

<Start>

@echo off

:atv1
rem Erreichbarkeit des Remote Server überprüfen
echo Ueberpruefe die Drahtlosverbindung zu Apple TV #1 ...
Ping 192.100.120.104 -n 3 |find /i "Request timed out" > nul
if %errorlevel% ==0 goto atv1

:atv2
rem Erreichbarkeit des Remote Server überprüfen
echo Ueberpruefe die Drahtlosverbindung zu Apple TV #2 ...
Ping 192.100.120.103 -n 3 |find /i "Request timed out" > nul
if %errorlevel% ==0 goto atv2

:connected
rem Warten bis die Verbindung aufgebaut wurde
Ping 127.0.0.1 -n 5

echo Verbindung aufgebaut
winscp.exe /console /script=XBMCsync.script
cls
echo Die Synchronisation wurde erfolgreich durchgefuehrt!

<End>

2. Now create the WinSCP Script which syncs the tow aTV's. Copy the Code between <Start> and <End> in a File names XBMCsync.script

<Start>

# ###########################################################
# A p p l e T V # 1 #
# ###########################################################
#
# Alle Prompts und Fehlermeldungen werden negativ beantwortet
option batch on
# Nicht nachfragen wenn eine Datei überschrieben werden soll
option confirm off
# Dateien die nicht synchronisiert werden sollen
option exclude "guisettings.xml;"
# Verbindung zum Server
open frontrow:[email protected]
# Synchronisation
synchronize local -delete -mirror "d:\.XBMCsync\XBMC" "/Users/frontrow/Library/Application Support/XBMC/"
# Verbindung schliessen
close

# ###########################################################
# A p p l e T V # 2 #
# ###########################################################
#
# Alle Prompts und Fehlermeldungen werden negativ beantwortet
option batch on
# Nicht nachfragen wenn eine Datei überschrieben werden soll
option confirm off
# Dateien die nicht synchronisiert werden sollen
option exclude "guisettings.xml;"
# Verbindung zum Server
open frontrow:[email protected]
# Synchronisation
synchronize remote -delete -mirror "d:\.XBMCsync\XBMC" "/Users/frontrow/Library/Application Support/XBMC/"
# Verbindung schliessen
close

# Programm beenden
exit

<End>

3. You have to edit the IP-Adress in each file to the adress of your aTV's.
4. Edit the path starting with d:\... to a path on your Windows machine.
5. Download WinSCP portable, unzip it and copy the above files into the WinSCP folder.
6. Start XBMCsync.bat and here it goes. My firsttime sync tooked around 35 mins. but every new sync since that takes less than 30 sec.

Hope this helps some of you ...

Bye.
Efty