A security guard was shot and gravely wounded in the attack.
The army and local police who were summoned to the scene killed all the attackers, who arrived at the Agricultural Training Institute on Friday by rickshaw, the military's press wing said.
IG KPK Mehsud had earlier confirmed that at least four persons were injured including two students in the attack.
A report in Dawn said three burqa-clad men entered the directorate and started firing.
Reportedly, an explosion was also heard amid intense firing.
The area where the incident occurred is a hub for educational institutions in the city including the University of Peshawar.
Shehzad Akbar, medical director of Hayatabad Medical Complex, said six people died of their wounds and 18 were being treated. The institute hostel was officially closed on Friday due to the celebrations of Eid Miladun Nabi.
The compound includes a hostel facility for diploma students and there were around 100 people there at the time of attack, police said.More news: Download Microsoft Edge Browser for Android, it's now out of beta
It was not immediately clear how many people were wounded, with reports varying from at least five to 11 people.
He said three terrorists were killed by security forces after a gunfight which lasted an hour.
During the onslaught on the training centre, a spokesman for the Tehreek-e-Taliban Pakistan, Muhammad Khurasani, claimed responsibility for the attack in a telephone call to AFP.
The injured include a police sub-inspector and a constable.More news: Consumers and retailers win big over Thanksgiving holiday | National Retail Federation
An interior ministry official told AFP that cellular networks had been suspended in various cities across the country for security reasons.
Pakistan's Geo News reported that Peshawar Capital City Police Officer Sohail Khan is leading the operation.
In December 2014, Pakistani Taliban gunmen killed 134 children at Peshawar's Army Public School, one of the single deadliest attacks in the country's history.More news: Melania Trump unprepared for first lady, never thought Donald would win
- Apple Inc. (NASDAQ:AAPL) Files A Countersuit Against QUALCOMM, Inc. (NASDAQ:QCOM)
- Hurricanes drop out of top 4 in College Football Playoff poll
- One of the worst hurricane seasons finally ending
- Free flu vaccine clinics to open in Springfield
- Washington state sues Uber for millions over data breach cover up
- Cyclonic storm to hit Lakshadweep and southern Kerala, TN coast
- Mississippi State to name Penn State OC Joe Moorhead head coach
- No Christmas tree shortage in western MA
- Critics Bash First Lady Melania Trumpâ??s White House Christmas Decorations
- Nigeria draw Argentina for 5th time