If you the command ssh-copy-id fails with an error, you need to generate a SSH key first. Follow the SSH without Password section in the iPhone Dev Wiki. Also, if you change the default name for the .pub file (from id_rsa to something else) you should either not do that or workaround the lack of custom identify file selection in install.exec in Theos by creating a config file in your .ssh folder (Usually ~/.ssh). Type this: nano ~/.ssh/config then add this line: IdentityFile ~/.ssh/your_key_name Restart your Terminal session then SSH with public keys will work.
getting the error "/usr/bin/ssh-copy-id: ERROR: No identities found" when trying to set up the ssh-copy-id tried brew install ssh-copy-id but didn't help
Figured it out. needed to update brew, but that was taking a while. used brew doctor to see what warnings i needed to fix and did xcode-select --install which ended up making brew update faster. then ran brew install ssh-copy-id which let me use the command correctly. EDIT: this actually fixed brew but not the automatic log in. EDIT EDIT: looks like i have to use the ssh-keygen and do some stuff but it is 3am and I'm just happy I got it to work! automatic log in is nice to have but too happy I got this working.
@@mlpzaqwer This comment actually ended up helping me a lot so thanks you kind user. If anyone else is interested how i got it to work, run this: ssh-keygen **your target device password** ssh-copy-id -i **it saved a .pub file somewhere, put it here** -p 2222 root@localhost
For the people, here is the code. You are welcome :) @interface SBLockScreenViewControllerBase : UIViewController @end %hook SBLockScreenViewControllerBase - (void)viewDidLoad { %orig; // our code // UIView is a control from UIKit UIView *redSquare = [[UIView alloc] initWithFrame:CGRectMake(0,0,200,200)]; [redSquare setBackgroundColor:[UIColor redColor]]; [self.view addSubview:redSquare]; } %end
Montage LOL You need to generate your SSH keys. I’m pretty sure most guides recommend `ssh-keygen -t rsa -b 4096' and then follow the defaults. Then try the ssh-copy-id again
macbooks-Air:~ macbook$ ssh-copy-id root@localhost -p 2222 /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/macbook/.ssh/id_rsa.pub" /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: ERROR: ssh_exchange_identification: Connection closed by remote host
If you the command ssh-copy-id fails with an error, you need to generate a SSH key first. Follow the SSH without Password section in the iPhone Dev Wiki. Also, if you change the default name for the .pub file (from id_rsa to something else) you should either not do that or workaround the lack of custom identify file selection in install.exec in Theos by creating a config file in your .ssh folder (Usually ~/.ssh). Type this:
nano ~/.ssh/config
then add this line:
IdentityFile ~/.ssh/your_key_name
Restart your Terminal session then SSH with public keys will work.
thanks Bro
thanks zane, is that possible to hook up swift apps with Theos? if that true can you give me an example on github? i really appreciate you.
id like to know aswell
Can I use Putty for Windows?
Easy Z Yup, any SSH client should work.
getting the error "/usr/bin/ssh-copy-id: ERROR: No identities found" when trying to set up the ssh-copy-id tried brew install ssh-copy-id but didn't help
Figured it out. needed to update brew, but that was taking a while. used brew doctor to see what warnings i needed to fix and did xcode-select --install which ended up making brew update faster. then ran brew install ssh-copy-id which let me use the command correctly.
EDIT: this actually fixed brew but not the automatic log in.
EDIT EDIT: looks like i have to use the ssh-keygen and do some stuff but it is 3am and I'm just happy I got it to work! automatic log in is nice to have but too happy I got this working.
@@mlpzaqwer
This comment actually ended up helping me a lot so thanks you kind user.
If anyone else is interested how i got it to work, run this:
ssh-keygen **your target device password**
ssh-copy-id -i **it saved a .pub file somewhere, put it here** -p 2222 root@localhost
Sir, can this method used to copy photos from the iPhone to Mac?
Meyrisa Astini If it’s stored in a file, yes, you can use scp/ftp to transfer the photo/video
@@ZaneHelton Sorry sir, do you have a tutorial video for that?
Meyrisa Astini nope
@@ZaneHelton Alright, Thank you Sir!
For the people, here is the code. You are welcome :)
@interface SBLockScreenViewControllerBase : UIViewController
@end
%hook SBLockScreenViewControllerBase
- (void)viewDidLoad {
%orig;
// our code
// UIView is a control from UIKit
UIView *redSquare = [[UIView alloc] initWithFrame:CGRectMake(0,0,200,200)];
[redSquare setBackgroundColor:[UIColor redColor]];
[self.view addSubview:redSquare];
}
%end
lol how is nano not for grownups :(
what's going on?
macbooks-Air:~ macbook$ ssh root@localhost -p 2222
ssh_exchange_identification: read: Connection reset by peer
Try running `ssh-copy-id root@localhost -p 2222'
macbooks-Air:~ macbook$ ssh-copy-id root@localhost -p 2222
/usr/bin/ssh-copy-id: ERROR: No identities found
Montage LOL You need to generate your SSH keys. I’m pretty sure most guides recommend `ssh-keygen -t rsa -b 4096' and then follow the defaults. Then try the ssh-copy-id again
macbooks-Air:~ macbook$ ssh-copy-id root@localhost -p 2222
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/macbook/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: ERROR: ssh_exchange_identification: Connection closed by remote host
it still have ERROR ssh_exchange_identification: Connection closed by remote host