Putin told the assembly, on the banks of a lake near Moscow, the Russian takeover of Crimea in March was essential to save a largely Russian-speaking population from Ukrainian government violence. He said continued fighting in eastern Ukraine, where pro-Russian separatists launched an uprising in April, was the result of a refusal by Kiev to negotiate.
Ukraine, and Western governments, accuse Russia of sending troops and armor to back the separatists in a conflict that has already killed over 2,000 people. Russia denies the charge.
"Russia is far from being involved in any large-scale conflicts," he said at the camp on the banks of Lake Seliger. "We don't want that and don't plan on it. But naturally, we should always be ready to repel any aggression towards Russia.
"Russia's partners... should understand it's best not to mess with us," said Putin, dressed casually in a grey sweater and light blue jeans.
"Thank God, I think no one is thinking of unleashing a large-scale conflict with Russia. I want to remind you that Russia is one of the leading nuclear powers."
Putin spoke easily with the students, many of whom looked to be asking scripted questions about demography and history. Other times he accepted gifts or, smilingly, played down their praise.
When a student said that she had not heard a single negative comment about Putin's presidency from camp speakers, he responded with a grin that "objectivity" was important.
His tone darkened when speaking on Ukraine, blaming the United States and the European Union for the "unconstitutional" removal of Kiev's former Moscow-backed president Viktor Yanukovich and replacement with a pro-European government.
He said eastern Ukraine did not agree with Yanukovich's removal and was now subjected to "crude military force" from government planes, tanks and artillery.
"If those are contemporary European values, then I'm simply disappointed in the highest degree," he said, comparing Ukraine's military operations in the east of the country with the Nazi siege of Leningrad in World War Two.
"Small villages and large cities surrounded by the Ukrainian army which is directly hitting residential areas with the aim of destroying the infrastructure... It sadly reminds me of the events of the Second World War, when German fascist... occupiers surrounded our cities."
(Reporting by Alexei Anishchuk, Writing by Thomas Grove; editing by Ralph Boulton)