பாஓடு வழியாக செல் அணுகல்

உங்கள் கணினியிலிருந்து செல்லை அணுக பாஓடு ஐப் பயன்படுத்தலாம். பிழைத்திருத்த அல்லது மேம்பட்ட செல் பயன்பாட்டிற்கு இது பயனுள்ளதாக இருக்கும்.

இதற்கு உங்களுக்கு ஒரு பாஓடு விசை இணை தேவை. கடவுச்சொல் வழியாக உள்நுழைவது இயல்பாகவே முடக்கப்பட்டுள்ளது.

உங்கள் பொது விசையை உருவாக்கவும்

If not already created, create your public key. Default choices should be fine for LAN. You can leave empty password if you don't want to deal with it each time:

ssh-keygen

உங்கள் கருவியிற்கு பொது விசையை நகலெடுக்கவும்

உங்கள் பொது விசையை உங்கள் கருவியிற்கு மாற்ற வேண்டும். இதைச் செய்ய பல வழிகள் உள்ளன. இவை சில விருப்பங்கள்:

  • இணை the UBports device and the PC with a USB cable. Then நகலெடு the கோப்பு using your file-manager.

  • அல்லது, விசையை உங்களுக்கு மின்னஞ்சல் அனுப்புவதன் மூலம் இணையம் வழியாக மாற்றவும் அல்லது உங்கள் சொந்த முகில் ச்டோரேச், வலை சேவையகம் போன்றவற்றில் பதிவேற்றவும்.

  • You can also connect via adb and use the following command to copy it (Some devices cant support ADB, check the devices page to learn more.):

    adb push ~/.ssh/id_rsa.pub /home/phablet/
    

உங்கள் கருவியை உள்ளமைக்கவும்

Now you have the public key on the UBports device. Let's assume it's stored as /home/phablet/id_rsa.pub. Use the terminal app or an ADB connection to perform the following steps on your device.

mkdir /home/phablet/.ssh
chmod 700 /home/phablet/.ssh
cat /home/phablet/id_rsa.pub >> /home/phablet/.ssh/authorized_keys
chmod 600 /home/phablet/.ssh/authorized_keys
chown -R phablet:phablet /home/phablet/.ssh

Now start the SSH server:

sudo systemctl start ssh.socket

இணை

Now everything is set up and you can use ssh

ssh phablet@ubuntu-phablet

or, if that does not work

ssh phablet@<ip-address>

To identify the IP-address of your UBports device, open the Terminal app on your device and run the following command:

hostname -I

The output is a list of IP addresses separated by spaces. Use the IP address that matches your subnet. On your PC or laptop:

debian2:~/$ hostname -I
192.168.42.41 2001:982:89e9:1:bc6b:758:7ba2:c190

On the phone:

phablet@ubuntu-phablet:~$ hostname -I
10.55.74.177 192.168.42.52 2001:982:89e9:1:ef68:5f7c:3db4:c0d3

இந்த வழக்கில் நீங்கள் இரண்டாவது ஐபி முகவரியைப் பயன்படுத்துகிறீர்கள்

கோப்புகளை மாற்ற இப்போது நீங்கள் இப்போது scp அல்லது sshfs ஐப் பயன்படுத்தலாம்.

உள்ளமைவு

you can enable ssh on boot by running the following command:

sudo systemctl enable ssh.socket

you can edit the port ssh is listening on with the following command:

sudo systemctl edit ssh.socket

then add the following text:

[Socket]
ListenStream=
ListenStream=[customPort]

சரிசெய்தல்

If connecting fails with the message

kex_exchange_identification: read: Connection reset by peer

check the log on the UBports device

journalctl | grep sshd

If you see a message about missing hostkeys such as

sshd: no hostkeys available -- exiting.

You need to generate host keys with the following command

sudo ssh-keygen -A

குறிப்புகள்