Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-agent >> PRNG is not seeded #29

Closed
ZaxonXP opened this issue Dec 15, 2017 · 18 comments
Closed

ssh-agent >> PRNG is not seeded #29

ZaxonXP opened this issue Dec 15, 2017 · 18 comments
Labels

Comments

@ZaxonXP
Copy link

ZaxonXP commented Dec 15, 2017

I installed the TermuxArch and I want to use it as my default shell, so I am migrating my settings from the termux as much as possible.

One of the thngs I want to use is the ssh-agent, so I do not have to type the password each time I do remote ssh or scp. However when I do the:

ssh-agent

I got the:

PRNG is not seeded

Any ideas?

Regards,
Piotr

@ghost
Copy link

ghost commented Dec 15, 2017

Can you acess /dev/random or /dev/urandom? (cat them)
PRNG cannot be seeded if the chroot directory doesn't have acess to the /dev pseudofilesystem.

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 15, 2017

Yes, they both producing some random characters when I cat them.

@ghost
Copy link

ghost commented Dec 15, 2017

try this
mknod -m 0644 /dev/random c 1 8 mknod -m 0644 /dev/urandom c 1 9
and retry the ssh command.

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 15, 2017

It says mknod: /dev/urandom: File exists and mknod: /dev/random: File exists

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 18, 2017

Any ideas?

@SDRausty
Copy link
Owner

SDRausty commented Dec 19, 2017

Thank you for your comments and consideration regarding this matter. Random, this is a very interesting issue! Use

[04:31 home ]$ random="$(dd if=/dev/urandom bs=3 count=1)"
1+0 records in
1+0 records out
3 bytes copied, 0.000339479 s, 8.8 kB/s
[05:04 home ]$ random="$(dd if=/dev/random bs=3 count=1)"
1+0 records in
1+0 records out
3 bytes copied, 0.000463229 s, 6.5 kB/s

To read as this is a quieter alternative to reading from these files.

As regular Termux user, Arch Linux in Termux PRoot user, su and sulogin rm commands all yield rm: cannot remove '/dev/random': Permission denied. Information about deleting and recreating these system files is welcome at this thread.

@SDRausty
Copy link
Owner

[05:26 home ]$ dd if=/dev/urandom bs=3 count=1 ��1+0 records in 1+0 records out 3 bytes copied, 0.000247031 s, 12.1 kB/s [05:27 home ]$ dd if=/dev/urandom bs=3 count=1 of=ra 1+0 records in 1+0 records out 3 bytes copied, 0.00605912 s, 0.5 kB/s [05:27 home ]$ !ca cat ra h��[05:27 home ]$ dd if=/dev/urandom bs=3 count=1 of=ra |cat ra h��1+0 records in 1+0 records out 3 bytes copied, 0.00385885 s, 0.8 kB/s [05:27 home ]$

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 19, 2017

@SDRausty: What is your point with the dd code? I did the test using cat and the random devices were producing random output. But still I cannot use ssh-agent due to the PRNG is not seeded error. How can I fix this?

@SDRausty
Copy link
Owner

@ZaxonXP have you explained your topic at https://wiki.archlinux.org/index.php/IRC_Channel and similar discussion groups?

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 19, 2017

@SDRausty: No, I did not. Yesterday I gave up the TermuxArch because of this and some other issues. Maybe I give another try some day.

@SDRausty
Copy link
Owner

@ZaxonXP Are the randon devices producing random output?

the random devices were producing random output.

How did you reseed?

@ZaxonXP
Copy link
Author

ZaxonXP commented Dec 19, 2017

@SDRausty: when I did cat /dev/urandom and cat /dev/random they printed random characters (also not ASCII) on the terminal. What do you mean by "how did you reseed"?

@SDRausty
Copy link
Owner

@ZaxonXP Reseeding and random are related to entropy (A measure of the disorder or randomness in a closed system). It appears that the root Arch Linux user cannot access this due to Android permission selinux.

@SDRausty
Copy link
Owner

These links https://duckduckgo.com/html?q=reseed%20random%20device%20site%3Atldp.org are here for our future scrutiny.

@SDRausty
Copy link
Owner

SDRausty commented Dec 21, 2017

It seems like the random devices are working fine on aarch64. See 9aea551 for newely added BASH scripts to test these devices. @ZaxonXP scripts/frags/rnd/9.16.sh has examples of reseeding random. Another method of reseeding is to usedate.

@SDRausty
Copy link
Owner

This issue is closed since it does not concern setupTermuxArch.sh itself.

@Gold3nboy
Copy link

@SDRausty you closed this issue, but even reading the links and the other related issues it's not so clear how to overcome this problem. Can you please give some detailed hints about how to use ssh-agent ?

@arno01
Copy link

arno01 commented Oct 18, 2019

That was the proot issue termux/proot#62 (comment) which has been fixed in this commit termux/proot@3ea655b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants