How to get special solutions of this system of equations?

I only want to get all the solutions of this system of the solutions with a value of $k$, we have the same values ​​of $m$

A = {1, 2, 3};
B = {2, 1, 0};
M = {a, b, c};
Solve[{a - b + c + m == 0,
SquaredEuclideanDistance[B, M] == k, (A - M). (B - M) == 0,
k > 0}, {a, b, c, m, k}, Integers]


In this ystem of the solutions, for example, $k = 6$, $m=1$ and $m = 3$.

A = {1, 2, 3};
B = {2, 1, 0};
M = {a, b, c};
Solve[{a - b + c + m == 0,
SquaredEuclideanDistance[B, M] == 6, (A - M). (B - M) == 0}, {a, b,
c, m}, Integers]


I do not how to start. How do I tell Mathematica to do that?

-

Perhaps

  {#, GatherBy[Solve[{a - b + c + m == 0,
SquaredEuclideanDistance[B, M] == #, (A - M).(B - M) == 0},
{a, b, c, m}, Integers], Last]} & /@ Range[10];
Grid[%]


or

 Table[{k, GatherBy[
Solve[{a - b + c + m == 0,
SquaredEuclideanDistance[B, M] == k,
(A - M).(B - M) == 0},
{a, b, c, m}, Integers],
Last]},
{k, Range[10]}];
Grid[%]


or, (the solutions grouped by the values of k and m?):

GatherBy[
Solve[{a - b + c + m == 0,
SquaredEuclideanDistance[B, M] == k,
(A - M).(B - M) == 0},
{a, b, c, k, m}, Integers],
#[[-2 ;;]] &]

-

By the linguistically esoteric phrase,

"...with a value of k, we have the same values ​​of m"

I guess you mean that you want to collect/filter the set of solutions given by Solve for cases where values of both $k$ and $m$ are constant! If this is indeed the case then try the following where res is the list of $23$ solution returned by your Solve.

collected=
Sort[
Select[
GatherBy[res, (#[[4]] && #[[5]]) &],
Length@# >= 2 &
],
#1[[1, 5, 2]] < #2[[1, 5, 2]] &
]


This gives us $10$ pairs of solutions where for a fixed value of $k$ we have same value of $m$. The Sort is used just to order the pairs according to the value of $k$. Following are the $3$ outliers that do not follow above pattern are

Complement[res, collected]


{{a -> 1, b -> 2, c -> 0, m -> 1, k -> 2},

{a -> 1, b -> 2, c -> 3, m -> -2, k -> 11},

{a -> 2, b -> 1, c -> 3, m -> -4, k -> 9}}

-