PageRenderTime 23ms CodeModel.GetById 17ms app.highlight 2ms RepoModel.GetById 2ms app.codeStats 0ms

/docs/RemoteDebugging.txt

http://github.com/graemeg/lazarus
Plain Text | 88 lines | 56 code | 32 blank | 0 comment | 0 complexity | 1353c4ea81c4a1554e15a01c24a3559e MD5 | raw file
 1Remote Debugging
 2================
 3
 4* Remote debugging is under construction *
 5
 6Remote debugging means you work on your local computer and you want to start
 7and debug a program on another computer, the remote machine. In the following
 8examples the name of the local computer is 'localcomp' and the name of the
 9remote computer is 'remotecomp'.
10
11
121. Using ssh (secure shell)
13
14  ssh (SSH client) is a program for logging into a remote machine and for
15  executing commands on a remote machine.  It is intended to replace rlogin
16  and rsh, and provide secure encrypted communications between two
17  untrusted hosts over an insecure network.  X11 connections and arbitrary
18  TCP/IP ports can also be forwarded over the secure channel.
19  See the ssh man page for details.
20  
21  This text only handles ssh protocol 2. For differences for protocol 1 see the
22  ssh man page.
23  
24  
25  Requirements for lazarus:
26  You must be able to log in via ssh to the remote machine (the computer where
27  the program will run). This means the remote machine has an installed and
28  running ssh server and you have an account allowed to login from your
29  local machine (the computer where the lazarus IDE is running).
30  You can test this by doing:
31  
32  []$ ssh username@remotecomp ls -la
33  
34  This will create a ssh connection to 'remotecomp' with the username
35  'username' and after authentification it will print out a directory listing
36  and return.
37  
38  
39  Configuring ssh:
40  The IDE needs a ssh connection without prompting for a password. There are a
41  lot of possibilities to achieve this. This text only describes a few. For
42  security reasons it is strongly recommended that you read the ssh manpage.
43
44  Solution 1: User based authentification.
45    This will allow one specific user on the local computer to establish a ssh
46    connection to the remote computer as a specific user without prompting for
47    password.
48    ToDo: describe the server settings. On redhat this works without any change.
49    
50    Step 1: create the rsa key on the local machine
51
52      This will create two files on the local machine:
53        ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
54      If you already have these files, skip this step.
55    
56      []$ ssh-keygen -t rsa
57
58      Keep the default and leave the passphrase empty.
59      
60      
61    Step 2: copy the public rsa key of the local machine to the remote machine
62
63      []$ scp ~/.ssh/id_rsa.pub user@remotecomp:remote.pub
64      
65
66    Step 3: create on the remote machine the file ~/.ssh/authorized_keys2
67
68      []$ ssh user@remotecomp
69      []$ touch ~/.ssh/authorized_keys2
70      []$ chmod 600 ~/.ssh/authorized_keys2
71      
72      The chmod will set the permissions to only allow yourself to read the
73      file. ssh wants this.
74      
75      []$ cat remote.pub >> ~/.ssh/authorized_keys2
76      []$ rm remote.pub
77      []$ exit
78
79
80    Step 4: Test. You should now be able to login without password.
81
82      []$ ssh user@remotecomp
83
84      
85    Step 5: Setup the ssh debugger in the IDE
86      ToDo
87      
88