Is it right for a supervisor to try to prevent his students from pursuing other research directions by simultaneously working with other professors? I have faced a problem recently with my academic advisor and I seek some advice. I have been working with my advisor for one and a half year now. No publication resulted so far. 

One of the problems is that I feel unfocussed. I tried to enter a lot of subjects at once. I felt that there are many interesting approaches that I tried to learn. This led me to waste a lot of time without making a significant progress in a definite direction. My supervisor has the same opinion of me. 

Recently, I suggested to him that I want to work on a problem in which he is actively working on which should shorten the time to get the degree. Now however, even if it is true that I am unfocussed, the biggest reason that prevented me from making progress on this problem is that I keep hearing from everyone that my supervisor writes mediocre recommendation letters to all his graduate students (maybe to keep them working for him, I honestly do not know). It seems dishonest to me to write lukewarm letters without warning the students beforehand that the letters would not be that good. I do not know this for certain because I did not see the letters. I did not trust these claims at first. 

However, some interactions also led me to the conclusion that I do not want to work with him. For instance, he did not tell me about various exchange opportunites. When I adked him  he denied that an opportunity exist. Then  he explicitly told me that he was afraid that I might, through this exchange program, get interested in another research problem that another professor is working on and start working on that. 

Is it right for a research supervisor to try to discourage/ prevent his students from contacting other professors/ working with them with other research projects and so on? 

Another question is: is it normal to remain unfocussed on a definite research problem for a long time ? (E.g. two years or so)
First and foremost it is the advisor's responsibility to aid and guide your research to get you out the door and into a career. But there are many ways to do that. 

One interpretation of the advisor not wanting you to work with others  is that it is a distraction and leading to your loss of focus. That would be a good reason for "preventing" your work with others. 

But, after two years, if you don't yet have a problem to focus on, then the advisor is falling down on the job, perhaps. They should be making suggestions about questions and directions and suggesting starting points, etc. But if they have been good at directing your research then you should have no issue with them. 

You have hearsay evidence about their letters of recommendation, but no direct evidence (I think). It is probably best to ignore it. 

I doubt that it is in any advisor's best interest to "keep people around." Everyone is better served by getting people out the door and new people in. There are a few exceptions, but you don't give indicators of that here. 

The advisor is correct to try to get you to focus. You will be best served by leaving other things aside and focusing on the one big idea that will lead to success. Perhaps the issues with "exchange" opportunities is also about getting you to focus, but it is impossible to say from a distance. 

If you have a lot of ideas, I suggest that you simply record them in a "future research" notebook and then let them go for now. It is very useful to start a new job with such a notebook. But wandering around a vast landscape won't get you to that spot on the research frontier that will lead to success. 

Nose to the grindstone. 

However, there needs to be mutual trust between student and advisor. If you have truly lost that, then it might be best for you to give up your current advisor and move to another. It might mean starting over, and it might or might not have an effect on your ability to "focus".