What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

SSH - iPad to Linux workstation

writersglen

iPF Noob
Joined
Oct 17, 2013
Messages
2
Reaction score
0
Hello,

I would like to 1) connect my iPad to my Linux workstation over my local wi- fi network and 2) my iPad to my remote Linux server over the Internet.

I've downloaded WebSSH but don't fully understand configuration and handling of public/private keys. Can some generous soul guide me through the process or point me to a detailed tutorial? Is there another SSH client I should consider as we'll?

Many thanks,

LRP
 

Redjupiter

iPF Noob
Joined
Mar 24, 2013
Messages
68
Reaction score
9
Location
UK
Hello,

I would like to 1) connect my iPad to my Linux workstation over my local wi- fi network and 2) my iPad to my remote Linux server over the Internet.

I've downloaded WebSSH but don't fully understand configuration and handling of public/private keys. Can some generous soul guide me through the process or point me to a detailed tutorial? Is there another SSH client I should consider as we'll?

Many thanks,

LRP

Hi there, You dont say which Linux you use. I use Fedora 19.

Step 1 . Make sure if you have firewall to fire it up and make sure ssh is allowed in as a trusted protocol/service. The default is acceptable.

Step 2. Make sure the service is started. do the following as root

[username@localhost ~]$ systemctl start sshd

followed by this to make sure:

[root@localhost username]# systemctl status sshd

sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled)
Active: active (running) since Sat 2013-10-19 01:32:05 BST; 7min ago
Process: 2953 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS)
Main PID: 2977 (sshd)
CGroup: name=systemd:/system/sshd.service
└─2977 /usr/sbin/sshd -D

Oct 19 01:32:05 localhost.localdomain sshd-keygen[2953]: Generating SSH2 RSA host key: [ OK ]
Oct 19 01:32:05 localhost.localdomain sshd-keygen[2953]: Generating SSH1 RSA host key: [ OK ]
Oct 19 01:32:05 localhost.localdomain systemd[1]: Started OpenSSH server daemon.
Oct 19 01:32:06 localhost.localdomain sshd[2977]: Server listening on 0.0.0.0 port 22.
Oct 19 01:32:06 localhost.localdomain sshd[2977]: Server listening on :: port 22.
Oct 19 01:32:32 localhost.localdomain sshd[3069]: Accepted password for username from 127.0.0.1 port 47056 ssh2
Oct 19 01:32:51 localhost.localdomain sshd[3214]: Accepted password for username from 192.168.1.1 port 49794 ssh2

as you see the ssh daemon "sshd" has successfully started and is listening on port 22.

now as a normal user on the same machine do the following:

ssh -l <username> localhost

The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 83:1b:12:a8:e1:27:0f:7e:e3:8d:3d:6f:6b:25:3e:0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

as you see the keys have already been created for you.

on the same terminal do the following:

ifconfig -a

and notice your IP address. if you are connected to a router like me , it will be in the range 192.168.x.x for local network.

now fire webssh on your Ipad (I used Ipad mini):

you should be in webssh connection:

type is ssh
host (host is your lcoal Linux machine IP address) for example 192.168.1.5
port is 22
User <enter the user name that exists on the Linux machine)
password <your password>

and connect.

if not successful recheck the above steps and make sure the firewall, if any, is not blocking the service.

to connect form outside, you will need to configure the router to allow port 22 to your machine. Find the page in yoru router and make sure something like this:

port 22 to machine (local Linux machine address for example 192.168.1.5) is enabled.

You might need to reboot the router for the option to take effect. Mine did not care.

now find the ip addres of your router.

go to webssh and in the host option enter the router ip address and connect. that is it.

good luck
 
Last edited:

Redjupiter

iPF Noob
Joined
Mar 24, 2013
Messages
68
Reaction score
9
Location
UK
OK, now to use your own rsa keys, as I mentioned I am using Fedora 19 pretty much similar on all distro but better check (I had to do this all over again :) ), I followed these steps 9.2.4.*Using a Key-Based Authentication I then copied the private key from ~/.ssh/id_rsa and emailed it to my ipad. In ipad I opened Webssh and changed from password to private key. Then tap on private key, open the email which has id-rsa, copy the text and past it in webssh just beneath the "private key", chang to encrypted, same user name, use password that you used to generate the keys not theuser password (but this one unlocks your private key) and connect as usual. This method is much safer. If anything not clear let me know.
 
Last edited:

Most reactions

Top