Baidu can search at any time, you do not bother to search.
http://tieba.baidu.com/p/671327617
Ssh tunnel can typically achieve 3 functions
1) Encrypted network transmission
2) bypassing the firewall
3) machines that connect a WAN-based machine to a local area network
---------------------------------------------------------------------------------
Can Delphi log in to Linux via SSH and connect MySQL to fetch numbers?
SSH is one of the ways to connect to Linux remotely.
Currently Linux MySQL does not allow open remote access, so you can only access MySQL after SSH login to Linux.
Like navicat parameter is SSH channel, fill in the Linux server IP, user, password,
Also has the parameter to fill the MySQL IP, the user, the password which installs under the Linux, Navicat can connect the MySQL to fetch the number
Delphi components can be directly connected to the basic MySQL IP, user, password, currently cannot find the relevant first through SSH, then MySQL connection information ah.
Don't know how to connect to MySQL on a remote Linux server locally via SSH
Ask the heroes to show their guidance
---------------------------------------------------------------------------------
Thank you heroes, after 2 days of groping, the basic function realized.
Most SSH connection software has SSH channel forwarding function, which is implemented with this.
If Delphi is implemented in code, you can use Libssh or Securebridge.
The code basically does not have the post, the thought to everybody to say.
SSH has port forwarding (mapping) function, the MySQL port of Linux, mapped to the corresponding port of the machine,
The access is then equal to the native installation of MySQL direct access.
---------------------------------------------------------------------------------
Install the control into the Unidac Demos\technologyspecific\securebridge directory. Then add the Crsshiohandler control, And then you can use the Securebridge when you set up the Unidac Iohandler.
Then through the Xuchuantao (Dark Angel) Hero's guidance:
The SSH Channel port can now be mapped or
Implemented with UNIDAC + Securebridge.
UNIDAC's Demos\technologyspecific\securebridge also has a Crssliohandler component to install
Drag out Sshclient, Sshchannel, Crssliohandler, filestorage components
Uniconnection Iohandler Properties Associate the component Crssliohandler
Then fill in the MySQL connection information by normal direct connection
Sshclient component HostName (Linux server IP), PassWord (password), port (port), User (Linux login User: ROOT)
And then it's all OK.
Of course SSH wants key to be able to join in Sshclient's Onserverkeyvalidate event
Var
Key:tsckey;
FP, msg:string;
Begin
Key: = ScFileStorage.Keys.FindKey (Scsshclient.hostname);
if (Key = nil) or not Key.ready then
Begin
Newserverkey.getfingerprint (haMD5, FP);
Newserverkey.keyname: = Scsshclient.hostname;
SCFILESTORAGE.KEYS.ADD (Newserverkey);
Accept: = True;
End
End
Yes, otherwise the connection will prompt Host key not verified when running
Then you can happily connect, of course, MySQL garbled problem is to set up UTF8 and Useunicode
http://bbs.2ccc.com/topic.asp?topicid=504027
http://bbs.2ccc.com/topic.asp?topicid=516086
Can Delphi log in to Linux via SSH and connect MySQL to fetch numbers? Just like Navicat.