Thousands of troops from NATO and its partner nations are training on land and sea in central and eastern Europe.
Though he denied the Russian state had been involved in hacking, Putin said individual "patriotic" hackers could mount their own attacks.
Russian state gas exporter Gazprom, which supplies around a third of the EU's gas, is keen for Nord Stream 2 to be built by 2019.
The security and foreign policy of the European Union needs to be uniform, Estonian President Kersti Kaljulaid said during a meeting with Slovakian President Andrej Kiska in Bratislava.
The 27 other leaders looked on in awkward silence as Trump suggested most NATO countries were freeloaders not paying their share for military protection.