Page 1 of 1

Transferring APTicket.der (and SSH)

PostPosted: Sat Mar 04, 2017 3:02 pm
by morpheus
Broxin writes:

Thanks for the Jailbreak.
Im on a Win7 PC. Can i use WinSCP to transfer apticket.der from ATV to PC ?
if i want to connect over port 22 it says that SFTP is revoked by ATV.
I can connect over Putty to the ATV on 127.0.0.1:22 and see the file, but i dont know how to copy it to my local Win7 machine.

i also tried
C:\pscp root@127.0.0.1:/System/Library/Caches/apticket.der C:/1/

but i get

bash: /usr/libexec/sftp-server: No such file or directory
Fatal: Received unexpected end-of-file from server


Thanks

Re: Transferring APTicket.der (and SSH)

PostPosted: Sat Mar 04, 2017 3:03 pm
by morpheus
Answer: Use SCP, not SFTP. The two are different protocols, and the latter requires a binary which I have not included.

If instead you use SCP, you should be ok. prior to doing so, move /tmp/usr/local/bin/* contents to /usr/local/bin, so scp can be started on the TV as well.

Re: Transferring APTicket.der (and SSH)

PostPosted: Sat Mar 04, 2017 3:22 pm
by Siguza
Cheap SCP substitute:

Code: Select all
ssh root@127.0.0.1 'cat /System/Library/Caches/apticket.der' > apticket.der

(Replace "127.0.0.1" and "cat" with IP/path as needed.)

Re: Transferring APTicket.der (and SSH)

PostPosted: Sat Mar 04, 2017 5:06 pm
by pubacajhen
Hello,

I have succesfully jailbreak the device(10.1) yesterday, but been unsuccesfull to ssh to it. Dropbear process at Macs Instruments are not there. Tried with newer/todays version of jailbreak, install to the device with impactor, try to run it, but no go. Should I reboot the device first abd then try to jaibreak again?
Thanks,

Puba

Re-download, re-jailbreak, and it will work. Just trying a new IPA when the device is jailbroken already will do nothing -- you need to reboot, and unfortunately go through a couple of panics before getting it right

Success, ssh working, thanks again, Morpheus.

Re: Transferring APTicket.der (and SSH)

PostPosted: Sat Mar 04, 2017 5:09 pm
by kcterry
Administrator wrote:Answer: Use SCP, not SFTP. The two are different protocols, and the latter requires a binary which I have not included.

If instead you use SCP, you should be ok. prior to doing so, move /tmp/usr/local/bin/* contents to /usr/local/bin, so scp can be started on the TV as well.


When using SCP with WinSCP I get the following error when trying to connect:
Command 'ls -la '
failed with return code 127 and error message
-bash: line 35: ls: command not found.

Observe what the error message says: "ls is not found". If you recall (from the FAQ), I install none of the binaries. This means, that, to enable scp, you will have to manually move binaries from /tmp/xxx to /xxx (e.g. /tmp/usr/bin to /usr/bin) yourself. **DO SO WITH EXTREME CAUTION**, as I made every effort to ensure all the binaries are safe, but you need to make sure NOT to overwrite any existing ones as **OVERWRITING AN EXISTING BINARY WILL BRICK YOU**. Thus, if it said "ls not found" move "ls" into its respective location, try again. If it then says some other binary was not found, move it as well. It will then work perfectly.

Re: Transferring APTicket.der (and SSH)

PostPosted: Sun Mar 05, 2017 1:01 am
by RiotNrrrd
Administrator wrote:This means, that, to enable scp, you will have to manually move binaries from /tmp/xxx to /xxx (e.g. /tmp/usr/bin to /usr/bin) yourself.

I found I can run scp straight from /tmp/usr/bin/scp if I just symlink dbclient:

Code: Select all
[root@NSA-listening-station ~]# ls -l /usr/bin/dbclient
lrwxr-xr-x  1 root  wheel    27B Mar  4 03:28 /usr/bin/dbclient@ -> /tmp/usr/local/bin/dbclient


Yeah, that works too. Under dropbear, scp is just an alias to dbclient, which handles - as the name implies - all the functionality. Note that there is no difference in practice between a symlink and copying - I would suggest the latter, therefore, because /tmp gets cleared on every reboot (and repopulated by liberTV), so if you're going to modify the root filesystem anyway with a symlink you might as well just copy the binary.