The announcement was made by the RMT union yesterday (Wednesday).
The first 24-hour walk-out is scheduled to take place on Tuesday, June 21, with a 48-hour strike the weekend after.
The union said a majority of its members had voted for strike action in a ballot with a 75 per cent turnout.
ScotRail said a solution to the dispute was “in talks not strikes” and said it would meet with the union on Wednesday.
The RMT said it has not received reassurances from the Abellio Scotrail franchise that driver-only services would not be extended.
Mick Cash, general secretary, said: “It is extraordinary that Abellio/Scotrail continue to ignore the strength of feeling amongst their staff over the extension of DOO and that they are still trying to by-pass the normal negotiating machinery.
“That disgraceful and cavalier approach to jobs and safety on Scotland’s railways now leaves us with no choice but to move to a campaign of industrial action.
”The workforce know that any extension of DOO or DCO is a clear attack on our members hard earned terms and conditions. RMT members should not have to face the risk of their role and responsibilities being reduced and undermined.
The union accused Abellio/ScotRail of targeting individual members through social media and junk mail in a “campaign of misinformation”.
Mr Cash added: “The workforce also know only too well that there is a very real threat to passengers of watering down and wiping out the safety critical role of the guard on these Scotrail services. That is a lethal gamble with basic rail safety.
“The union remains available for serious and meaningful talks but the ball is now firmly in Scotrail’s court.”
The RMT said the six strikes will be held between 00.01 and 23.59 on: Tuesday, June 21; Thursday, June 23; Saturday, June 25 and Sunday, June 26; Sunday, July 3; Sunday, July 10 and Sunday, July 17.
A spokeswoman for ScotRail said: “We believe that the solution to this dispute lies in talks not strikes. We look forward to getting round the table again for continued talks with RMT today (Wednesday).”